diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-27 09:44:11 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-27 09:44:11 -0500 |
commit | a44dca1717ce2c2381339e21c07d1731a63a7888 (patch) | |
tree | 3d0b3bd26492f9fa1f1f1c1ad838315b266da7c1 /arch/arm/mach-davinci | |
parent | 30ebc5e44d057a1619ad63fe32c8c1670c37c4b8 (diff) | |
parent | a49f0d1ea3ec94fc7cf33a7c36a16343b74bd565 (diff) |
Merge tag 'v3.8-rc1' into staging/for_v3.9
Linux 3.8-rc1
* tag 'v3.8-rc1': (10696 commits)
Linux 3.8-rc1
Revert "nfsd: warn on odd reply state in nfsd_vfs_read"
ARM: dts: fix duplicated build target and alphabetical sort out for exynos
dm stripe: add WRITE SAME support
dm: remove map_info
dm snapshot: do not use map_context
dm thin: dont use map_context
dm raid1: dont use map_context
dm flakey: dont use map_context
dm raid1: rename read_record to bio_record
dm: move target request nr to dm_target_io
dm snapshot: use per_bio_data
dm verity: use per_bio_data
dm raid1: use per_bio_data
dm: introduce per_bio_data
dm kcopyd: add WRITE SAME support to dm_kcopyd_zero
dm linear: add WRITE SAME support
dm: add WRITE SAME support
dm: prepare to support WRITE SAME
dm ioctl: use kmalloc if possible
...
Conflicts:
MAINTAINERS
Diffstat (limited to 'arch/arm/mach-davinci')
29 files changed, 270 insertions, 130 deletions
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index f8eecb959413..0153950f6068 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig | |||
@@ -58,6 +58,14 @@ config ARCH_DAVINCI_TNETV107X | |||
58 | 58 | ||
59 | comment "DaVinci Board Type" | 59 | comment "DaVinci Board Type" |
60 | 60 | ||
61 | config MACH_DA8XX_DT | ||
62 | bool "Support DA8XX platforms using device tree" | ||
63 | default y | ||
64 | depends on ARCH_DAVINCI_DA8XX | ||
65 | help | ||
66 | Say y here to include support for TI DaVinci DA850 based using | ||
67 | Flattened Device Tree. More information at Documentation/devicetree | ||
68 | |||
61 | config MACH_DAVINCI_EVM | 69 | config MACH_DAVINCI_EVM |
62 | bool "TI DM644x EVM" | 70 | bool "TI DM644x EVM" |
63 | default ARCH_DAVINCI_DM644x | 71 | default ARCH_DAVINCI_DM644x |
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile index 2227effcb0e9..fb5c1aa98a63 100644 --- a/arch/arm/mach-davinci/Makefile +++ b/arch/arm/mach-davinci/Makefile | |||
@@ -22,6 +22,7 @@ obj-$(CONFIG_AINTC) += irq.o | |||
22 | obj-$(CONFIG_CP_INTC) += cp_intc.o | 22 | obj-$(CONFIG_CP_INTC) += cp_intc.o |
23 | 23 | ||
24 | # Board specific | 24 | # Board specific |
25 | obj-$(CONFIG_MACH_DA8XX_DT) += da8xx-dt.o | ||
25 | obj-$(CONFIG_MACH_DAVINCI_EVM) += board-dm644x-evm.o | 26 | obj-$(CONFIG_MACH_DAVINCI_EVM) += board-dm644x-evm.o |
26 | obj-$(CONFIG_MACH_SFFSDR) += board-sffsdr.o | 27 | obj-$(CONFIG_MACH_SFFSDR) += board-sffsdr.o |
27 | obj-$(CONFIG_MACH_NEUROS_OSD2) += board-neuros-osd2.o | 28 | obj-$(CONFIG_MACH_NEUROS_OSD2) += board-neuros-osd2.o |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 32ee3f895967..0299915575a8 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -11,39 +11,41 @@ | |||
11 | * is licensed "as is" without any warranty of any kind, whether express | 11 | * is licensed "as is" without any warranty of any kind, whether express |
12 | * or implied. | 12 | * or implied. |
13 | */ | 13 | */ |
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/console.h> | 14 | #include <linux/console.h> |
15 | #include <linux/delay.h> | ||
16 | #include <linux/gpio.h> | ||
17 | #include <linux/gpio_keys.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/kernel.h> | ||
17 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
18 | #include <linux/i2c/at24.h> | 21 | #include <linux/i2c/at24.h> |
19 | #include <linux/i2c/pca953x.h> | 22 | #include <linux/i2c/pca953x.h> |
20 | #include <linux/input.h> | 23 | #include <linux/input.h> |
24 | #include <linux/input/tps6507x-ts.h> | ||
21 | #include <linux/mfd/tps6507x.h> | 25 | #include <linux/mfd/tps6507x.h> |
22 | #include <linux/gpio.h> | ||
23 | #include <linux/gpio_keys.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/mtd/mtd.h> | 26 | #include <linux/mtd/mtd.h> |
26 | #include <linux/mtd/nand.h> | 27 | #include <linux/mtd/nand.h> |
27 | #include <linux/mtd/partitions.h> | 28 | #include <linux/mtd/partitions.h> |
28 | #include <linux/mtd/physmap.h> | 29 | #include <linux/mtd/physmap.h> |
30 | #include <linux/platform_device.h> | ||
31 | #include <linux/platform_data/mtd-davinci.h> | ||
32 | #include <linux/platform_data/mtd-davinci-aemif.h> | ||
33 | #include <linux/platform_data/spi-davinci.h> | ||
34 | #include <linux/platform_data/uio_pruss.h> | ||
29 | #include <linux/regulator/machine.h> | 35 | #include <linux/regulator/machine.h> |
30 | #include <linux/regulator/tps6507x.h> | 36 | #include <linux/regulator/tps6507x.h> |
31 | #include <linux/input/tps6507x-ts.h> | ||
32 | #include <linux/spi/spi.h> | 37 | #include <linux/spi/spi.h> |
33 | #include <linux/spi/flash.h> | 38 | #include <linux/spi/flash.h> |
34 | #include <linux/delay.h> | ||
35 | #include <linux/wl12xx.h> | 39 | #include <linux/wl12xx.h> |
36 | 40 | ||
37 | #include <asm/mach-types.h> | ||
38 | #include <asm/mach/arch.h> | ||
39 | #include <asm/system_info.h> | ||
40 | |||
41 | #include <mach/cp_intc.h> | 41 | #include <mach/cp_intc.h> |
42 | #include <mach/da8xx.h> | 42 | #include <mach/da8xx.h> |
43 | #include <linux/platform_data/mtd-davinci.h> | ||
44 | #include <mach/mux.h> | 43 | #include <mach/mux.h> |
45 | #include <linux/platform_data/mtd-davinci-aemif.h> | 44 | #include <mach/sram.h> |
46 | #include <linux/platform_data/spi-davinci.h> | 45 | |
46 | #include <asm/mach-types.h> | ||
47 | #include <asm/mach/arch.h> | ||
48 | #include <asm/system_info.h> | ||
47 | 49 | ||
48 | #include <media/tvp514x.h> | 50 | #include <media/tvp514x.h> |
49 | #include <media/adv7343.h> | 51 | #include <media/adv7343.h> |
@@ -762,16 +764,19 @@ static u8 da850_iis_serializer_direction[] = { | |||
762 | }; | 764 | }; |
763 | 765 | ||
764 | static struct snd_platform_data da850_evm_snd_data = { | 766 | static struct snd_platform_data da850_evm_snd_data = { |
765 | .tx_dma_offset = 0x2000, | 767 | .tx_dma_offset = 0x2000, |
766 | .rx_dma_offset = 0x2000, | 768 | .rx_dma_offset = 0x2000, |
767 | .op_mode = DAVINCI_MCASP_IIS_MODE, | 769 | .op_mode = DAVINCI_MCASP_IIS_MODE, |
768 | .num_serializer = ARRAY_SIZE(da850_iis_serializer_direction), | 770 | .num_serializer = ARRAY_SIZE(da850_iis_serializer_direction), |
769 | .tdm_slots = 2, | 771 | .tdm_slots = 2, |
770 | .serial_dir = da850_iis_serializer_direction, | 772 | .serial_dir = da850_iis_serializer_direction, |
771 | .asp_chan_q = EVENTQ_0, | 773 | .asp_chan_q = EVENTQ_0, |
772 | .version = MCASP_VERSION_2, | 774 | .ram_chan_q = EVENTQ_1, |
773 | .txnumevt = 1, | 775 | .version = MCASP_VERSION_2, |
774 | .rxnumevt = 1, | 776 | .txnumevt = 1, |
777 | .rxnumevt = 1, | ||
778 | .sram_size_playback = SZ_8K, | ||
779 | .sram_size_capture = SZ_8K, | ||
775 | }; | 780 | }; |
776 | 781 | ||
777 | static const short da850_evm_mcasp_pins[] __initconst = { | 782 | static const short da850_evm_mcasp_pins[] __initconst = { |
@@ -1509,6 +1514,7 @@ static __init void da850_evm_init(void) | |||
1509 | pr_warning("da850_evm_init: mcasp mux setup failed: %d\n", | 1514 | pr_warning("da850_evm_init: mcasp mux setup failed: %d\n", |
1510 | ret); | 1515 | ret); |
1511 | 1516 | ||
1517 | da850_evm_snd_data.sram_pool = sram_get_gen_pool(); | ||
1512 | da8xx_register_mcasp(0, &da850_evm_snd_data); | 1518 | da8xx_register_mcasp(0, &da850_evm_snd_data); |
1513 | 1519 | ||
1514 | ret = davinci_cfg_reg_list(da850_lcdcntl_pins); | 1520 | ret = davinci_cfg_reg_list(da850_lcdcntl_pins); |
@@ -1516,6 +1522,11 @@ static __init void da850_evm_init(void) | |||
1516 | pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n", | 1522 | pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n", |
1517 | ret); | 1523 | ret); |
1518 | 1524 | ||
1525 | ret = da8xx_register_uio_pruss(); | ||
1526 | if (ret) | ||
1527 | pr_warn("da850_evm_init: pruss initialization failed: %d\n", | ||
1528 | ret); | ||
1529 | |||
1519 | /* Handle board specific muxing for LCD here */ | 1530 | /* Handle board specific muxing for LCD here */ |
1520 | ret = davinci_cfg_reg_list(da850_evm_lcdc_pins); | 1531 | ret = davinci_cfg_reg_list(da850_evm_lcdc_pins); |
1521 | if (ret) | 1532 | if (ret) |
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index 88ebea89abdf..cdf8d0746e79 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c | |||
@@ -324,7 +324,7 @@ static __init void dm355_evm_init(void) | |||
324 | if (IS_ERR(aemif)) | 324 | if (IS_ERR(aemif)) |
325 | WARN("%s: unable to get AEMIF clock\n", __func__); | 325 | WARN("%s: unable to get AEMIF clock\n", __func__); |
326 | else | 326 | else |
327 | clk_enable(aemif); | 327 | clk_prepare_enable(aemif); |
328 | 328 | ||
329 | platform_add_devices(davinci_evm_devices, | 329 | platform_add_devices(davinci_evm_devices, |
330 | ARRAY_SIZE(davinci_evm_devices)); | 330 | ARRAY_SIZE(davinci_evm_devices)); |
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c index 2f88103c6459..d41954507fc2 100644 --- a/arch/arm/mach-davinci/board-dm355-leopard.c +++ b/arch/arm/mach-davinci/board-dm355-leopard.c | |||
@@ -246,7 +246,7 @@ static __init void dm355_leopard_init(void) | |||
246 | if (IS_ERR(aemif)) | 246 | if (IS_ERR(aemif)) |
247 | WARN("%s: unable to get AEMIF clock\n", __func__); | 247 | WARN("%s: unable to get AEMIF clock\n", __func__); |
248 | else | 248 | else |
249 | clk_enable(aemif); | 249 | clk_prepare_enable(aemif); |
250 | 250 | ||
251 | platform_add_devices(davinci_leopard_devices, | 251 | platform_add_devices(davinci_leopard_devices, |
252 | ARRAY_SIZE(davinci_leopard_devices)); | 252 | ARRAY_SIZE(davinci_leopard_devices)); |
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 1b4a8adcfdc9..5d49c75388ca 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -478,7 +478,7 @@ static void __init evm_init_cpld(void) | |||
478 | aemif_clk = clk_get(NULL, "aemif"); | 478 | aemif_clk = clk_get(NULL, "aemif"); |
479 | if (IS_ERR(aemif_clk)) | 479 | if (IS_ERR(aemif_clk)) |
480 | return; | 480 | return; |
481 | clk_enable(aemif_clk); | 481 | clk_prepare_enable(aemif_clk); |
482 | 482 | ||
483 | if (request_mem_region(DM365_ASYNC_EMIF_DATA_CE1_BASE, SECTION_SIZE, | 483 | if (request_mem_region(DM365_ASYNC_EMIF_DATA_CE1_BASE, SECTION_SIZE, |
484 | "cpld") == NULL) | 484 | "cpld") == NULL) |
@@ -489,7 +489,7 @@ static void __init evm_init_cpld(void) | |||
489 | SECTION_SIZE); | 489 | SECTION_SIZE); |
490 | fail: | 490 | fail: |
491 | pr_err("ERROR: can't map CPLD\n"); | 491 | pr_err("ERROR: can't map CPLD\n"); |
492 | clk_disable(aemif_clk); | 492 | clk_disable_unprepare(aemif_clk); |
493 | return; | 493 | return; |
494 | } | 494 | } |
495 | 495 | ||
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index b00ade498077..8e1b4ffb5e54 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -519,13 +519,11 @@ static int dm6444evm_msp430_get_pins(void) | |||
519 | char buf[4]; | 519 | char buf[4]; |
520 | struct i2c_msg msg[2] = { | 520 | struct i2c_msg msg[2] = { |
521 | { | 521 | { |
522 | .addr = dm6446evm_msp->addr, | ||
523 | .flags = 0, | 522 | .flags = 0, |
524 | .len = 2, | 523 | .len = 2, |
525 | .buf = (void __force *)txbuf, | 524 | .buf = (void __force *)txbuf, |
526 | }, | 525 | }, |
527 | { | 526 | { |
528 | .addr = dm6446evm_msp->addr, | ||
529 | .flags = I2C_M_RD, | 527 | .flags = I2C_M_RD, |
530 | .len = 4, | 528 | .len = 4, |
531 | .buf = buf, | 529 | .buf = buf, |
@@ -536,6 +534,9 @@ static int dm6444evm_msp430_get_pins(void) | |||
536 | if (!dm6446evm_msp) | 534 | if (!dm6446evm_msp) |
537 | return -ENXIO; | 535 | return -ENXIO; |
538 | 536 | ||
537 | msg[0].addr = dm6446evm_msp->addr; | ||
538 | msg[1].addr = dm6446evm_msp->addr; | ||
539 | |||
539 | /* Command 4 == get input state, returns port 2 and port3 data | 540 | /* Command 4 == get input state, returns port 2 and port3 data |
540 | * S Addr W [A] len=2 [A] cmd=4 [A] | 541 | * S Addr W [A] len=2 [A] cmd=4 [A] |
541 | * RS Addr R [A] [len=4] A [cmd=4] A [port2] A [port3] N P | 542 | * RS Addr R [A] [len=4] A [cmd=4] A [port2] A [port3] N P |
@@ -776,7 +777,7 @@ static __init void davinci_evm_init(void) | |||
776 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 777 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
777 | 778 | ||
778 | aemif_clk = clk_get(NULL, "aemif"); | 779 | aemif_clk = clk_get(NULL, "aemif"); |
779 | clk_enable(aemif_clk); | 780 | clk_prepare_enable(aemif_clk); |
780 | 781 | ||
781 | if (HAS_ATA) { | 782 | if (HAS_ATA) { |
782 | if (HAS_NAND || HAS_NOR) | 783 | if (HAS_NAND || HAS_NOR) |
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 1dbf85beed1b..9211e8800c79 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
@@ -194,7 +194,7 @@ static int evm_led_setup(struct i2c_client *client, int gpio, | |||
194 | while (ngpio--) { | 194 | while (ngpio--) { |
195 | leds->gpio = gpio++; | 195 | leds->gpio = gpio++; |
196 | leds++; | 196 | leds++; |
197 | }; | 197 | } |
198 | 198 | ||
199 | evm_led_dev = platform_device_alloc("leds-gpio", 0); | 199 | evm_led_dev = platform_device_alloc("leds-gpio", 0); |
200 | platform_device_add_data(evm_led_dev, &evm_led_data, | 200 | platform_device_add_data(evm_led_dev, &evm_led_data, |
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c index 144bf31d68dd..3e3e3afebf88 100644 --- a/arch/arm/mach-davinci/board-neuros-osd2.c +++ b/arch/arm/mach-davinci/board-neuros-osd2.c | |||
@@ -188,7 +188,7 @@ static __init void davinci_ntosd2_init(void) | |||
188 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 188 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
189 | 189 | ||
190 | aemif_clk = clk_get(NULL, "aemif"); | 190 | aemif_clk = clk_get(NULL, "aemif"); |
191 | clk_enable(aemif_clk); | 191 | clk_prepare_enable(aemif_clk); |
192 | 192 | ||
193 | if (HAS_ATA) { | 193 | if (HAS_ATA) { |
194 | if (HAS_NAND) | 194 | if (HAS_NAND) |
diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c index 64b0f65a8639..a794f6d9d444 100644 --- a/arch/arm/mach-davinci/common.c +++ b/arch/arm/mach-davinci/common.c | |||
@@ -87,8 +87,6 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info) | |||
87 | iotable_init(davinci_soc_info.io_desc, | 87 | iotable_init(davinci_soc_info.io_desc, |
88 | davinci_soc_info.io_desc_num); | 88 | davinci_soc_info.io_desc_num); |
89 | 89 | ||
90 | init_consistent_dma_size(14 << 20); | ||
91 | |||
92 | /* | 90 | /* |
93 | * Normally devicemaps_init() would flush caches and tlb after | 91 | * Normally devicemaps_init() would flush caches and tlb after |
94 | * mdesc->map_io(), but we must also do it here because of the CPU | 92 | * mdesc->map_io(), but we must also do it here because of the CPU |
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index 510648e0394b..678a54a64dae 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c | |||
@@ -408,7 +408,7 @@ static struct clk_lookup da830_clks[] = { | |||
408 | CLK(NULL, "pwm2", &pwm2_clk), | 408 | CLK(NULL, "pwm2", &pwm2_clk), |
409 | CLK("eqep.0", NULL, &eqep0_clk), | 409 | CLK("eqep.0", NULL, &eqep0_clk), |
410 | CLK("eqep.1", NULL, &eqep1_clk), | 410 | CLK("eqep.1", NULL, &eqep1_clk), |
411 | CLK("da8xx_lcdc.0", NULL, &lcdc_clk), | 411 | CLK("da8xx_lcdc.0", "fck", &lcdc_clk), |
412 | CLK("davinci-mcasp.0", NULL, &mcasp0_clk), | 412 | CLK("davinci-mcasp.0", NULL, &mcasp0_clk), |
413 | CLK("davinci-mcasp.1", NULL, &mcasp1_clk), | 413 | CLK("davinci-mcasp.1", NULL, &mcasp1_clk), |
414 | CLK("davinci-mcasp.2", NULL, &mcasp2_clk), | 414 | CLK("davinci-mcasp.2", NULL, &mcasp2_clk), |
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index b90c172d5541..6b9154e9f908 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -212,6 +212,12 @@ static struct clk tptc2_clk = { | |||
212 | .flags = ALWAYS_ENABLED, | 212 | .flags = ALWAYS_ENABLED, |
213 | }; | 213 | }; |
214 | 214 | ||
215 | static struct clk pruss_clk = { | ||
216 | .name = "pruss", | ||
217 | .parent = &pll0_sysclk2, | ||
218 | .lpsc = DA8XX_LPSC0_PRUSS, | ||
219 | }; | ||
220 | |||
215 | static struct clk uart0_clk = { | 221 | static struct clk uart0_clk = { |
216 | .name = "uart0", | 222 | .name = "uart0", |
217 | .parent = &pll0_sysclk2, | 223 | .parent = &pll0_sysclk2, |
@@ -385,6 +391,7 @@ static struct clk_lookup da850_clks[] = { | |||
385 | CLK(NULL, "tptc1", &tptc1_clk), | 391 | CLK(NULL, "tptc1", &tptc1_clk), |
386 | CLK(NULL, "tpcc1", &tpcc1_clk), | 392 | CLK(NULL, "tpcc1", &tpcc1_clk), |
387 | CLK(NULL, "tptc2", &tptc2_clk), | 393 | CLK(NULL, "tptc2", &tptc2_clk), |
394 | CLK("pruss_uio", "pruss", &pruss_clk), | ||
388 | CLK(NULL, "uart0", &uart0_clk), | 395 | CLK(NULL, "uart0", &uart0_clk), |
389 | CLK(NULL, "uart1", &uart1_clk), | 396 | CLK(NULL, "uart1", &uart1_clk), |
390 | CLK(NULL, "uart2", &uart2_clk), | 397 | CLK(NULL, "uart2", &uart2_clk), |
@@ -396,7 +403,7 @@ static struct clk_lookup da850_clks[] = { | |||
396 | CLK(NULL, "rmii", &rmii_clk), | 403 | CLK(NULL, "rmii", &rmii_clk), |
397 | CLK("davinci_emac.1", NULL, &emac_clk), | 404 | CLK("davinci_emac.1", NULL, &emac_clk), |
398 | CLK("davinci-mcasp.0", NULL, &mcasp_clk), | 405 | CLK("davinci-mcasp.0", NULL, &mcasp_clk), |
399 | CLK("da8xx_lcdc.0", NULL, &lcdc_clk), | 406 | CLK("da8xx_lcdc.0", "fck", &lcdc_clk), |
400 | CLK("davinci_mmc.0", NULL, &mmcsd0_clk), | 407 | CLK("davinci_mmc.0", NULL, &mmcsd0_clk), |
401 | CLK("davinci_mmc.1", NULL, &mmcsd1_clk), | 408 | CLK("davinci_mmc.1", NULL, &mmcsd1_clk), |
402 | CLK(NULL, "aemif", &aemif_clk), | 409 | CLK(NULL, "aemif", &aemif_clk), |
@@ -781,12 +788,6 @@ static struct map_desc da850_io_desc[] = { | |||
781 | .length = DA8XX_CP_INTC_SIZE, | 788 | .length = DA8XX_CP_INTC_SIZE, |
782 | .type = MT_DEVICE | 789 | .type = MT_DEVICE |
783 | }, | 790 | }, |
784 | { | ||
785 | .virtual = SRAM_VIRT, | ||
786 | .pfn = __phys_to_pfn(DA8XX_ARM_RAM_BASE), | ||
787 | .length = SZ_8K, | ||
788 | .type = MT_DEVICE | ||
789 | }, | ||
790 | }; | 791 | }; |
791 | 792 | ||
792 | static u32 da850_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE }; | 793 | static u32 da850_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE }; |
@@ -1239,8 +1240,8 @@ static struct davinci_soc_info davinci_soc_info_da850 = { | |||
1239 | .gpio_irq = IRQ_DA8XX_GPIO0, | 1240 | .gpio_irq = IRQ_DA8XX_GPIO0, |
1240 | .serial_dev = &da8xx_serial_device, | 1241 | .serial_dev = &da8xx_serial_device, |
1241 | .emac_pdata = &da8xx_emac_pdata, | 1242 | .emac_pdata = &da8xx_emac_pdata, |
1242 | .sram_dma = DA8XX_ARM_RAM_BASE, | 1243 | .sram_dma = DA8XX_SHARED_RAM_BASE, |
1243 | .sram_len = SZ_8K, | 1244 | .sram_len = SZ_128K, |
1244 | }; | 1245 | }; |
1245 | 1246 | ||
1246 | void __init da850_init(void) | 1247 | void __init da850_init(void) |
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c new file mode 100644 index 000000000000..37c27af18fa0 --- /dev/null +++ b/arch/arm/mach-davinci/da8xx-dt.c | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ | ||
3 | * | ||
4 | * Modified from mach-omap/omap2/board-generic.c | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #include <linux/io.h> | ||
11 | #include <linux/of_irq.h> | ||
12 | #include <linux/of_platform.h> | ||
13 | #include <linux/irqdomain.h> | ||
14 | |||
15 | #include <asm/mach/arch.h> | ||
16 | |||
17 | #include <mach/common.h> | ||
18 | #include <mach/cp_intc.h> | ||
19 | #include <mach/da8xx.h> | ||
20 | |||
21 | #define DA8XX_NUM_UARTS 3 | ||
22 | |||
23 | void __init da8xx_uart_clk_enable(void) | ||
24 | { | ||
25 | int i; | ||
26 | for (i = 0; i < DA8XX_NUM_UARTS; i++) | ||
27 | davinci_serial_setup_clk(i, NULL); | ||
28 | } | ||
29 | |||
30 | static struct of_device_id da8xx_irq_match[] __initdata = { | ||
31 | { .compatible = "ti,cp-intc", .data = cp_intc_of_init, }, | ||
32 | { } | ||
33 | }; | ||
34 | |||
35 | static void __init da8xx_init_irq(void) | ||
36 | { | ||
37 | of_irq_init(da8xx_irq_match); | ||
38 | } | ||
39 | |||
40 | #ifdef CONFIG_ARCH_DAVINCI_DA850 | ||
41 | |||
42 | static void __init da850_init_machine(void) | ||
43 | { | ||
44 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
45 | |||
46 | da8xx_uart_clk_enable(); | ||
47 | } | ||
48 | |||
49 | static const char *da850_boards_compat[] __initdata = { | ||
50 | "enbw,cmc", | ||
51 | "ti,da850-evm", | ||
52 | "ti,da850", | ||
53 | NULL, | ||
54 | }; | ||
55 | |||
56 | DT_MACHINE_START(DA850_DT, "Generic DA850/OMAP-L138/AM18x") | ||
57 | .map_io = da850_init, | ||
58 | .init_irq = da8xx_init_irq, | ||
59 | .timer = &davinci_timer, | ||
60 | .init_machine = da850_init_machine, | ||
61 | .dt_compat = da850_boards_compat, | ||
62 | .init_late = davinci_init_late, | ||
63 | .restart = da8xx_restart, | ||
64 | MACHINE_END | ||
65 | |||
66 | #endif | ||
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index bd2f72b414bc..2d5502d84a22 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <mach/time.h> | 22 | #include <mach/time.h> |
23 | #include <mach/da8xx.h> | 23 | #include <mach/da8xx.h> |
24 | #include <mach/cpuidle.h> | 24 | #include <mach/cpuidle.h> |
25 | #include <mach/sram.h> | ||
25 | 26 | ||
26 | #include "clock.h" | 27 | #include "clock.h" |
27 | #include "asp.h" | 28 | #include "asp.h" |
@@ -32,6 +33,7 @@ | |||
32 | #define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */ | 33 | #define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */ |
33 | #define DA8XX_I2C0_BASE 0x01c22000 | 34 | #define DA8XX_I2C0_BASE 0x01c22000 |
34 | #define DA8XX_RTC_BASE 0x01c23000 | 35 | #define DA8XX_RTC_BASE 0x01c23000 |
36 | #define DA8XX_PRUSS_MEM_BASE 0x01c30000 | ||
35 | #define DA8XX_MMCSD0_BASE 0x01c40000 | 37 | #define DA8XX_MMCSD0_BASE 0x01c40000 |
36 | #define DA8XX_SPI0_BASE 0x01c41000 | 38 | #define DA8XX_SPI0_BASE 0x01c41000 |
37 | #define DA830_SPI1_BASE 0x01e12000 | 39 | #define DA830_SPI1_BASE 0x01e12000 |
@@ -518,29 +520,78 @@ void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata) | |||
518 | } | 520 | } |
519 | } | 521 | } |
520 | 522 | ||
521 | static const struct display_panel disp_panel = { | 523 | static struct resource da8xx_pruss_resources[] = { |
522 | QVGA, | 524 | { |
523 | 16, | 525 | .start = DA8XX_PRUSS_MEM_BASE, |
524 | 16, | 526 | .end = DA8XX_PRUSS_MEM_BASE + 0xFFFF, |
525 | COLOR_ACTIVE, | 527 | .flags = IORESOURCE_MEM, |
528 | }, | ||
529 | { | ||
530 | .start = IRQ_DA8XX_EVTOUT0, | ||
531 | .end = IRQ_DA8XX_EVTOUT0, | ||
532 | .flags = IORESOURCE_IRQ, | ||
533 | }, | ||
534 | { | ||
535 | .start = IRQ_DA8XX_EVTOUT1, | ||
536 | .end = IRQ_DA8XX_EVTOUT1, | ||
537 | .flags = IORESOURCE_IRQ, | ||
538 | }, | ||
539 | { | ||
540 | .start = IRQ_DA8XX_EVTOUT2, | ||
541 | .end = IRQ_DA8XX_EVTOUT2, | ||
542 | .flags = IORESOURCE_IRQ, | ||
543 | }, | ||
544 | { | ||
545 | .start = IRQ_DA8XX_EVTOUT3, | ||
546 | .end = IRQ_DA8XX_EVTOUT3, | ||
547 | .flags = IORESOURCE_IRQ, | ||
548 | }, | ||
549 | { | ||
550 | .start = IRQ_DA8XX_EVTOUT4, | ||
551 | .end = IRQ_DA8XX_EVTOUT4, | ||
552 | .flags = IORESOURCE_IRQ, | ||
553 | }, | ||
554 | { | ||
555 | .start = IRQ_DA8XX_EVTOUT5, | ||
556 | .end = IRQ_DA8XX_EVTOUT5, | ||
557 | .flags = IORESOURCE_IRQ, | ||
558 | }, | ||
559 | { | ||
560 | .start = IRQ_DA8XX_EVTOUT6, | ||
561 | .end = IRQ_DA8XX_EVTOUT6, | ||
562 | .flags = IORESOURCE_IRQ, | ||
563 | }, | ||
564 | { | ||
565 | .start = IRQ_DA8XX_EVTOUT7, | ||
566 | .end = IRQ_DA8XX_EVTOUT7, | ||
567 | .flags = IORESOURCE_IRQ, | ||
568 | }, | ||
569 | }; | ||
570 | |||
571 | static struct uio_pruss_pdata da8xx_uio_pruss_pdata = { | ||
572 | .pintc_base = 0x4000, | ||
573 | }; | ||
574 | |||
575 | static struct platform_device da8xx_uio_pruss_dev = { | ||
576 | .name = "pruss_uio", | ||
577 | .id = -1, | ||
578 | .num_resources = ARRAY_SIZE(da8xx_pruss_resources), | ||
579 | .resource = da8xx_pruss_resources, | ||
580 | .dev = { | ||
581 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
582 | .platform_data = &da8xx_uio_pruss_pdata, | ||
583 | } | ||
526 | }; | 584 | }; |
527 | 585 | ||
586 | int __init da8xx_register_uio_pruss(void) | ||
587 | { | ||
588 | da8xx_uio_pruss_pdata.sram_pool = sram_get_gen_pool(); | ||
589 | return platform_device_register(&da8xx_uio_pruss_dev); | ||
590 | } | ||
591 | |||
528 | static struct lcd_ctrl_config lcd_cfg = { | 592 | static struct lcd_ctrl_config lcd_cfg = { |
529 | &disp_panel, | 593 | .panel_shade = COLOR_ACTIVE, |
530 | .ac_bias = 255, | ||
531 | .ac_bias_intrpt = 0, | ||
532 | .dma_burst_sz = 16, | ||
533 | .bpp = 16, | 594 | .bpp = 16, |
534 | .fdd = 255, | ||
535 | .tft_alt_mode = 0, | ||
536 | .stn_565_mode = 0, | ||
537 | .mono_8bit_mode = 0, | ||
538 | .invert_line_clock = 1, | ||
539 | .invert_frm_clock = 1, | ||
540 | .sync_edge = 0, | ||
541 | .sync_ctrl = 1, | ||
542 | .raster_order = 0, | ||
543 | .fifo_th = 6, | ||
544 | }; | 595 | }; |
545 | 596 | ||
546 | struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata = { | 597 | struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata = { |
@@ -674,7 +725,7 @@ static struct resource da8xx_rtc_resources[] = { | |||
674 | }; | 725 | }; |
675 | 726 | ||
676 | static struct platform_device da8xx_rtc_device = { | 727 | static struct platform_device da8xx_rtc_device = { |
677 | .name = "omap_rtc", | 728 | .name = "da830-rtc", |
678 | .id = -1, | 729 | .id = -1, |
679 | .num_resources = ARRAY_SIZE(da8xx_rtc_resources), | 730 | .num_resources = ARRAY_SIZE(da8xx_rtc_resources), |
680 | .resource = da8xx_rtc_resources, | 731 | .resource = da8xx_rtc_resources, |
@@ -683,17 +734,6 @@ static struct platform_device da8xx_rtc_device = { | |||
683 | int da8xx_register_rtc(void) | 734 | int da8xx_register_rtc(void) |
684 | { | 735 | { |
685 | int ret; | 736 | int ret; |
686 | void __iomem *base; | ||
687 | |||
688 | base = ioremap(DA8XX_RTC_BASE, SZ_4K); | ||
689 | if (WARN_ON(!base)) | ||
690 | return -ENOMEM; | ||
691 | |||
692 | /* Unlock the rtc's registers */ | ||
693 | __raw_writel(0x83e70b13, base + 0x6c); | ||
694 | __raw_writel(0x95a4f1e0, base + 0x70); | ||
695 | |||
696 | iounmap(base); | ||
697 | 737 | ||
698 | ret = platform_device_register(&da8xx_rtc_device); | 738 | ret = platform_device_register(&da8xx_rtc_device); |
699 | if (!ret) | 739 | if (!ret) |
@@ -900,7 +940,7 @@ static int da850_sata_init(struct device *dev, void __iomem *addr) | |||
900 | if (IS_ERR(da850_sata_clk)) | 940 | if (IS_ERR(da850_sata_clk)) |
901 | return PTR_ERR(da850_sata_clk); | 941 | return PTR_ERR(da850_sata_clk); |
902 | 942 | ||
903 | ret = clk_enable(da850_sata_clk); | 943 | ret = clk_prepare_enable(da850_sata_clk); |
904 | if (ret) | 944 | if (ret) |
905 | goto err0; | 945 | goto err0; |
906 | 946 | ||
@@ -931,7 +971,7 @@ static int da850_sata_init(struct device *dev, void __iomem *addr) | |||
931 | return 0; | 971 | return 0; |
932 | 972 | ||
933 | err1: | 973 | err1: |
934 | clk_disable(da850_sata_clk); | 974 | clk_disable_unprepare(da850_sata_clk); |
935 | err0: | 975 | err0: |
936 | clk_put(da850_sata_clk); | 976 | clk_put(da850_sata_clk); |
937 | return ret; | 977 | return ret; |
@@ -939,7 +979,7 @@ err0: | |||
939 | 979 | ||
940 | static void da850_sata_exit(struct device *dev) | 980 | static void da850_sata_exit(struct device *dev) |
941 | { | 981 | { |
942 | clk_disable(da850_sata_clk); | 982 | clk_disable_unprepare(da850_sata_clk); |
943 | clk_put(da850_sata_clk); | 983 | clk_put(da850_sata_clk); |
944 | } | 984 | } |
945 | 985 | ||
diff --git a/arch/arm/mach-davinci/devices-tnetv107x.c b/arch/arm/mach-davinci/devices-tnetv107x.c index 29b17f7d3a5f..773ab07a71a0 100644 --- a/arch/arm/mach-davinci/devices-tnetv107x.c +++ b/arch/arm/mach-davinci/devices-tnetv107x.c | |||
@@ -374,7 +374,7 @@ void __init tnetv107x_devices_init(struct tnetv107x_device_info *info) | |||
374 | * complete sample conversion in time. | 374 | * complete sample conversion in time. |
375 | */ | 375 | */ |
376 | tsc_clk = clk_get(NULL, "sys_tsc_clk"); | 376 | tsc_clk = clk_get(NULL, "sys_tsc_clk"); |
377 | if (tsc_clk) { | 377 | if (!IS_ERR(tsc_clk)) { |
378 | error = clk_set_rate(tsc_clk, 5000000); | 378 | error = clk_set_rate(tsc_clk, 5000000); |
379 | WARN_ON(error < 0); | 379 | WARN_ON(error < 0); |
380 | clk_put(tsc_clk); | 380 | clk_put(tsc_clk); |
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index a255434908db..b49c3b77d55e 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
@@ -758,12 +758,6 @@ static struct map_desc dm355_io_desc[] = { | |||
758 | .length = IO_SIZE, | 758 | .length = IO_SIZE, |
759 | .type = MT_DEVICE | 759 | .type = MT_DEVICE |
760 | }, | 760 | }, |
761 | { | ||
762 | .virtual = SRAM_VIRT, | ||
763 | .pfn = __phys_to_pfn(0x00010000), | ||
764 | .length = SZ_32K, | ||
765 | .type = MT_MEMORY_NONCACHED, | ||
766 | }, | ||
767 | }; | 761 | }; |
768 | 762 | ||
769 | /* Contents of JTAG ID register used to identify exact cpu type */ | 763 | /* Contents of JTAG ID register used to identify exact cpu type */ |
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index b680c832e0ba..6c3980540be0 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -985,12 +985,6 @@ static struct map_desc dm365_io_desc[] = { | |||
985 | .length = IO_SIZE, | 985 | .length = IO_SIZE, |
986 | .type = MT_DEVICE | 986 | .type = MT_DEVICE |
987 | }, | 987 | }, |
988 | { | ||
989 | .virtual = SRAM_VIRT, | ||
990 | .pfn = __phys_to_pfn(0x00010000), | ||
991 | .length = SZ_32K, | ||
992 | .type = MT_MEMORY_NONCACHED, | ||
993 | }, | ||
994 | }; | 988 | }; |
995 | 989 | ||
996 | static struct resource dm365_ks_resources[] = { | 990 | static struct resource dm365_ks_resources[] = { |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 0849d5768d99..db1dd92e00af 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -779,12 +779,6 @@ static struct map_desc dm644x_io_desc[] = { | |||
779 | .length = IO_SIZE, | 779 | .length = IO_SIZE, |
780 | .type = MT_DEVICE | 780 | .type = MT_DEVICE |
781 | }, | 781 | }, |
782 | { | ||
783 | .virtual = SRAM_VIRT, | ||
784 | .pfn = __phys_to_pfn(0x00008000), | ||
785 | .length = SZ_16K, | ||
786 | .type = MT_MEMORY_NONCACHED, | ||
787 | }, | ||
788 | }; | 782 | }; |
789 | 783 | ||
790 | /* Contents of JTAG ID register used to identify exact cpu type */ | 784 | /* Contents of JTAG ID register used to identify exact cpu type */ |
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index 97c0f8e555bd..ac7b431c4c8e 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c | |||
@@ -756,12 +756,6 @@ static struct map_desc dm646x_io_desc[] = { | |||
756 | .length = IO_SIZE, | 756 | .length = IO_SIZE, |
757 | .type = MT_DEVICE | 757 | .type = MT_DEVICE |
758 | }, | 758 | }, |
759 | { | ||
760 | .virtual = SRAM_VIRT, | ||
761 | .pfn = __phys_to_pfn(0x00010000), | ||
762 | .length = SZ_32K, | ||
763 | .type = MT_MEMORY_NONCACHED, | ||
764 | }, | ||
765 | }; | 759 | }; |
766 | 760 | ||
767 | /* Contents of JTAG ID register used to identify exact cpu type */ | 761 | /* Contents of JTAG ID register used to identify exact cpu type */ |
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h index bdc4aa8e672a..046c7238a3d6 100644 --- a/arch/arm/mach-davinci/include/mach/common.h +++ b/arch/arm/mach-davinci/include/mach/common.h | |||
@@ -104,8 +104,6 @@ int davinci_pm_init(void); | |||
104 | static inline int davinci_pm_init(void) { return 0; } | 104 | static inline int davinci_pm_init(void) { return 0; } |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | /* standard place to map on-chip SRAMs; they *may* support DMA */ | ||
108 | #define SRAM_VIRT 0xfffe0000 | ||
109 | #define SRAM_SIZE SZ_128K | 107 | #define SRAM_SIZE SZ_128K |
110 | 108 | ||
111 | #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */ | 109 | #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index aaccdc4528fc..700d311c6854 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/platform_data/mmc-davinci.h> | 26 | #include <linux/platform_data/mmc-davinci.h> |
27 | #include <linux/platform_data/usb-davinci.h> | 27 | #include <linux/platform_data/usb-davinci.h> |
28 | #include <linux/platform_data/spi-davinci.h> | 28 | #include <linux/platform_data/spi-davinci.h> |
29 | #include <linux/platform_data/uio_pruss.h> | ||
29 | 30 | ||
30 | #include <media/davinci/vpif_types.h> | 31 | #include <media/davinci/vpif_types.h> |
31 | 32 | ||
@@ -72,6 +73,7 @@ extern unsigned int da850_max_speed; | |||
72 | #define DA8XX_AEMIF_CS2_BASE 0x60000000 | 73 | #define DA8XX_AEMIF_CS2_BASE 0x60000000 |
73 | #define DA8XX_AEMIF_CS3_BASE 0x62000000 | 74 | #define DA8XX_AEMIF_CS3_BASE 0x62000000 |
74 | #define DA8XX_AEMIF_CTL_BASE 0x68000000 | 75 | #define DA8XX_AEMIF_CTL_BASE 0x68000000 |
76 | #define DA8XX_SHARED_RAM_BASE 0x80000000 | ||
75 | #define DA8XX_ARM_RAM_BASE 0xffff0000 | 77 | #define DA8XX_ARM_RAM_BASE 0xffff0000 |
76 | 78 | ||
77 | void __init da830_init(void); | 79 | void __init da830_init(void); |
@@ -86,6 +88,7 @@ int da8xx_register_watchdog(void); | |||
86 | int da8xx_register_usb20(unsigned mA, unsigned potpgt); | 88 | int da8xx_register_usb20(unsigned mA, unsigned potpgt); |
87 | int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); | 89 | int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); |
88 | int da8xx_register_emac(void); | 90 | int da8xx_register_emac(void); |
91 | int da8xx_register_uio_pruss(void); | ||
89 | int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); | 92 | int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); |
90 | int da8xx_register_mmcsd0(struct davinci_mmc_config *config); | 93 | int da8xx_register_mmcsd0(struct davinci_mmc_config *config); |
91 | int da850_register_mmcsd1(struct davinci_mmc_config *config); | 94 | int da850_register_mmcsd1(struct davinci_mmc_config *config); |
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h index 46b3cd11c3c2..62ad300440f5 100644 --- a/arch/arm/mach-davinci/include/mach/serial.h +++ b/arch/arm/mach-davinci/include/mach/serial.h | |||
@@ -38,11 +38,12 @@ | |||
38 | 38 | ||
39 | #ifndef __ASSEMBLY__ | 39 | #ifndef __ASSEMBLY__ |
40 | struct davinci_uart_config { | 40 | struct davinci_uart_config { |
41 | /* Bit field of UARTs present; bit 0 --> UART1 */ | 41 | /* Bit field of UARTs present; bit 0 --> UART0 */ |
42 | unsigned int enabled_uarts; | 42 | unsigned int enabled_uarts; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | extern int davinci_serial_init(struct davinci_uart_config *); | 45 | extern int davinci_serial_init(struct davinci_uart_config *); |
46 | extern int davinci_serial_setup_clk(unsigned instance, unsigned int *rate); | ||
46 | #endif | 47 | #endif |
47 | 48 | ||
48 | #endif /* __ASM_ARCH_SERIAL_H */ | 49 | #endif /* __ASM_ARCH_SERIAL_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/sram.h b/arch/arm/mach-davinci/include/mach/sram.h index 111f7cc71e07..4e5db56218b8 100644 --- a/arch/arm/mach-davinci/include/mach/sram.h +++ b/arch/arm/mach-davinci/include/mach/sram.h | |||
@@ -24,4 +24,7 @@ | |||
24 | extern void *sram_alloc(size_t len, dma_addr_t *dma); | 24 | extern void *sram_alloc(size_t len, dma_addr_t *dma); |
25 | extern void sram_free(void *addr, size_t len); | 25 | extern void sram_free(void *addr, size_t len); |
26 | 26 | ||
27 | /* Get the struct gen_pool * for use in platform data */ | ||
28 | extern struct gen_pool *sram_get_gen_pool(void); | ||
29 | |||
27 | #endif /* __MACH_SRAM_H */ | 30 | #endif /* __MACH_SRAM_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h index 18cfd4977155..3a0ff905a69b 100644 --- a/arch/arm/mach-davinci/include/mach/uncompress.h +++ b/arch/arm/mach-davinci/include/mach/uncompress.h | |||
@@ -32,6 +32,9 @@ u32 *uart; | |||
32 | /* PORT_16C550A, in polled non-fifo mode */ | 32 | /* PORT_16C550A, in polled non-fifo mode */ |
33 | static void putc(char c) | 33 | static void putc(char c) |
34 | { | 34 | { |
35 | if (!uart) | ||
36 | return; | ||
37 | |||
35 | while (!(uart[UART_LSR] & UART_LSR_THRE)) | 38 | while (!(uart[UART_LSR] & UART_LSR_THRE)) |
36 | barrier(); | 39 | barrier(); |
37 | uart[UART_TX] = c; | 40 | uart[UART_TX] = c; |
@@ -39,6 +42,9 @@ static void putc(char c) | |||
39 | 42 | ||
40 | static inline void flush(void) | 43 | static inline void flush(void) |
41 | { | 44 | { |
45 | if (!uart) | ||
46 | return; | ||
47 | |||
42 | while (!(uart[UART_LSR] & UART_LSR_THRE)) | 48 | while (!(uart[UART_LSR] & UART_LSR_THRE)) |
43 | barrier(); | 49 | barrier(); |
44 | } | 50 | } |
diff --git a/arch/arm/mach-davinci/pm_domain.c b/arch/arm/mach-davinci/pm_domain.c index 00946e23c1ee..c90250e3bef8 100644 --- a/arch/arm/mach-davinci/pm_domain.c +++ b/arch/arm/mach-davinci/pm_domain.c | |||
@@ -53,6 +53,7 @@ static struct dev_pm_domain davinci_pm_domain = { | |||
53 | 53 | ||
54 | static struct pm_clk_notifier_block platform_bus_notifier = { | 54 | static struct pm_clk_notifier_block platform_bus_notifier = { |
55 | .pm_domain = &davinci_pm_domain, | 55 | .pm_domain = &davinci_pm_domain, |
56 | .con_ids = { "fck", NULL, }, | ||
56 | }; | 57 | }; |
57 | 58 | ||
58 | static int __init davinci_pm_runtime_init(void) | 59 | static int __init davinci_pm_runtime_init(void) |
diff --git a/arch/arm/mach-davinci/serial.c b/arch/arm/mach-davinci/serial.c index 1875740fe27c..f2625814c3c9 100644 --- a/arch/arm/mach-davinci/serial.c +++ b/arch/arm/mach-davinci/serial.c | |||
@@ -70,11 +70,33 @@ static void __init davinci_serial_reset(struct plat_serial8250_port *p) | |||
70 | UART_DM646X_SCR_TX_WATERMARK); | 70 | UART_DM646X_SCR_TX_WATERMARK); |
71 | } | 71 | } |
72 | 72 | ||
73 | int __init davinci_serial_init(struct davinci_uart_config *info) | 73 | /* Enable UART clock and obtain its rate */ |
74 | int __init davinci_serial_setup_clk(unsigned instance, unsigned int *rate) | ||
74 | { | 75 | { |
75 | int i; | ||
76 | char name[16]; | 76 | char name[16]; |
77 | struct clk *uart_clk; | 77 | struct clk *clk; |
78 | struct davinci_soc_info *soc_info = &davinci_soc_info; | ||
79 | struct device *dev = &soc_info->serial_dev->dev; | ||
80 | |||
81 | sprintf(name, "uart%d", instance); | ||
82 | clk = clk_get(dev, name); | ||
83 | if (IS_ERR(clk)) { | ||
84 | pr_err("%s:%d: failed to get UART%d clock\n", | ||
85 | __func__, __LINE__, instance); | ||
86 | return PTR_ERR(clk); | ||
87 | } | ||
88 | |||
89 | clk_prepare_enable(clk); | ||
90 | |||
91 | if (rate) | ||
92 | *rate = clk_get_rate(clk); | ||
93 | |||
94 | return 0; | ||
95 | } | ||
96 | |||
97 | int __init davinci_serial_init(struct davinci_uart_config *info) | ||
98 | { | ||
99 | int i, ret; | ||
78 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 100 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
79 | struct device *dev = &soc_info->serial_dev->dev; | 101 | struct device *dev = &soc_info->serial_dev->dev; |
80 | struct plat_serial8250_port *p = dev->platform_data; | 102 | struct plat_serial8250_port *p = dev->platform_data; |
@@ -87,16 +109,9 @@ int __init davinci_serial_init(struct davinci_uart_config *info) | |||
87 | if (!(info->enabled_uarts & (1 << i))) | 109 | if (!(info->enabled_uarts & (1 << i))) |
88 | continue; | 110 | continue; |
89 | 111 | ||
90 | sprintf(name, "uart%d", i); | 112 | ret = davinci_serial_setup_clk(i, &p->uartclk); |
91 | uart_clk = clk_get(dev, name); | 113 | if (ret) |
92 | if (IS_ERR(uart_clk)) { | ||
93 | printk(KERN_ERR "%s:%d: failed to get UART%d clock\n", | ||
94 | __func__, __LINE__, i); | ||
95 | continue; | 114 | continue; |
96 | } | ||
97 | |||
98 | clk_enable(uart_clk); | ||
99 | p->uartclk = clk_get_rate(uart_clk); | ||
100 | 115 | ||
101 | if (!p->membase && p->mapbase) { | 116 | if (!p->membase && p->mapbase) { |
102 | p->membase = ioremap(p->mapbase, SZ_4K); | 117 | p->membase = ioremap(p->mapbase, SZ_4K); |
diff --git a/arch/arm/mach-davinci/sram.c b/arch/arm/mach-davinci/sram.c index db0f7787faf1..c5f7ee5cc80a 100644 --- a/arch/arm/mach-davinci/sram.c +++ b/arch/arm/mach-davinci/sram.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/io.h> | ||
13 | #include <linux/genalloc.h> | 14 | #include <linux/genalloc.h> |
14 | 15 | ||
15 | #include <mach/common.h> | 16 | #include <mach/common.h> |
@@ -17,6 +18,11 @@ | |||
17 | 18 | ||
18 | static struct gen_pool *sram_pool; | 19 | static struct gen_pool *sram_pool; |
19 | 20 | ||
21 | struct gen_pool *sram_get_gen_pool(void) | ||
22 | { | ||
23 | return sram_pool; | ||
24 | } | ||
25 | |||
20 | void *sram_alloc(size_t len, dma_addr_t *dma) | 26 | void *sram_alloc(size_t len, dma_addr_t *dma) |
21 | { | 27 | { |
22 | unsigned long vaddr; | 28 | unsigned long vaddr; |
@@ -32,7 +38,7 @@ void *sram_alloc(size_t len, dma_addr_t *dma) | |||
32 | return NULL; | 38 | return NULL; |
33 | 39 | ||
34 | if (dma) | 40 | if (dma) |
35 | *dma = dma_base + (vaddr - SRAM_VIRT); | 41 | *dma = gen_pool_virt_to_phys(sram_pool, vaddr); |
36 | return (void *)vaddr; | 42 | return (void *)vaddr; |
37 | 43 | ||
38 | } | 44 | } |
@@ -53,8 +59,10 @@ EXPORT_SYMBOL(sram_free); | |||
53 | */ | 59 | */ |
54 | static int __init sram_init(void) | 60 | static int __init sram_init(void) |
55 | { | 61 | { |
62 | phys_addr_t phys = davinci_soc_info.sram_dma; | ||
56 | unsigned len = davinci_soc_info.sram_len; | 63 | unsigned len = davinci_soc_info.sram_len; |
57 | int status = 0; | 64 | int status = 0; |
65 | void *addr; | ||
58 | 66 | ||
59 | if (len) { | 67 | if (len) { |
60 | len = min_t(unsigned, len, SRAM_SIZE); | 68 | len = min_t(unsigned, len, SRAM_SIZE); |
@@ -62,8 +70,17 @@ static int __init sram_init(void) | |||
62 | if (!sram_pool) | 70 | if (!sram_pool) |
63 | status = -ENOMEM; | 71 | status = -ENOMEM; |
64 | } | 72 | } |
65 | if (sram_pool) | 73 | |
66 | status = gen_pool_add(sram_pool, SRAM_VIRT, len, -1); | 74 | if (sram_pool) { |
75 | addr = ioremap(phys, len); | ||
76 | if (!addr) | ||
77 | return -ENOMEM; | ||
78 | status = gen_pool_add_virt(sram_pool, (unsigned)addr, | ||
79 | phys, len, -1); | ||
80 | if (status < 0) | ||
81 | iounmap(addr); | ||
82 | } | ||
83 | |||
67 | WARN_ON(status < 0); | 84 | WARN_ON(status < 0); |
68 | return status; | 85 | return status; |
69 | } | 86 | } |
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c index 75da315b6587..9847938785ca 100644 --- a/arch/arm/mach-davinci/time.c +++ b/arch/arm/mach-davinci/time.c | |||
@@ -379,7 +379,7 @@ static void __init davinci_timer_init(void) | |||
379 | 379 | ||
380 | timer_clk = clk_get(NULL, "timer0"); | 380 | timer_clk = clk_get(NULL, "timer0"); |
381 | BUG_ON(IS_ERR(timer_clk)); | 381 | BUG_ON(IS_ERR(timer_clk)); |
382 | clk_enable(timer_clk); | 382 | clk_prepare_enable(timer_clk); |
383 | 383 | ||
384 | /* init timer hw */ | 384 | /* init timer hw */ |
385 | timer_init(); | 385 | timer_init(); |
@@ -429,7 +429,7 @@ void davinci_watchdog_reset(struct platform_device *pdev) | |||
429 | wd_clk = clk_get(&pdev->dev, NULL); | 429 | wd_clk = clk_get(&pdev->dev, NULL); |
430 | if (WARN_ON(IS_ERR(wd_clk))) | 430 | if (WARN_ON(IS_ERR(wd_clk))) |
431 | return; | 431 | return; |
432 | clk_enable(wd_clk); | 432 | clk_prepare_enable(wd_clk); |
433 | 433 | ||
434 | /* disable, internal clock source */ | 434 | /* disable, internal clock source */ |
435 | __raw_writel(0, base + TCR); | 435 | __raw_writel(0, base + TCR); |
diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c index f77b95336e2b..34509ffba221 100644 --- a/arch/arm/mach-davinci/usb.c +++ b/arch/arm/mach-davinci/usb.c | |||
@@ -42,14 +42,8 @@ static struct musb_hdrc_config musb_config = { | |||
42 | }; | 42 | }; |
43 | 43 | ||
44 | static struct musb_hdrc_platform_data usb_data = { | 44 | static struct musb_hdrc_platform_data usb_data = { |
45 | #if defined(CONFIG_USB_MUSB_OTG) | ||
46 | /* OTG requires a Mini-AB connector */ | 45 | /* OTG requires a Mini-AB connector */ |
47 | .mode = MUSB_OTG, | 46 | .mode = MUSB_OTG, |
48 | #elif defined(CONFIG_USB_MUSB_PERIPHERAL) | ||
49 | .mode = MUSB_PERIPHERAL, | ||
50 | #elif defined(CONFIG_USB_MUSB_HOST) | ||
51 | .mode = MUSB_HOST, | ||
52 | #endif | ||
53 | .clock = "usb", | 47 | .clock = "usb", |
54 | .config = &musb_config, | 48 | .config = &musb_config, |
55 | }; | 49 | }; |