diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
| commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
| tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/arm/mach-u300 | |
| parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) | |
Patched in Tegra support.
Diffstat (limited to 'arch/arm/mach-u300')
| -rw-r--r-- | arch/arm/mach-u300/Kconfig | 92 | ||||
| -rw-r--r-- | arch/arm/mach-u300/Makefile | 4 | ||||
| -rw-r--r-- | arch/arm/mach-u300/Makefile.boot | 17 | ||||
| -rw-r--r-- | arch/arm/mach-u300/core.c | 397 | ||||
| -rw-r--r-- | arch/arm/mach-u300/dma_channels.h | 60 | ||||
| -rw-r--r-- | arch/arm/mach-u300/dummyspichip.c | 6 | ||||
| -rw-r--r-- | arch/arm/mach-u300/i2c.c | 70 | ||||
| -rw-r--r-- | arch/arm/mach-u300/include/mach/debug-macro.S | 2 | ||||
| -rw-r--r-- | arch/arm/mach-u300/include/mach/irqs.h | 159 | ||||
| -rw-r--r-- | arch/arm/mach-u300/include/mach/syscon.h | 168 | ||||
| -rw-r--r-- | arch/arm/mach-u300/include/mach/u300-regs.h | 28 | ||||
| -rw-r--r-- | arch/arm/mach-u300/spi.c | 22 | ||||
| -rw-r--r-- | arch/arm/mach-u300/timer.c | 22 | ||||
| -rw-r--r-- | arch/arm/mach-u300/timer.h | 1 | ||||
| -rw-r--r-- | arch/arm/mach-u300/u300-gpio.h | 70 |
15 files changed, 731 insertions, 387 deletions
diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig index 1f597647d43..32a7b0f7e9f 100644 --- a/arch/arm/mach-u300/Kconfig +++ b/arch/arm/mach-u300/Kconfig | |||
| @@ -1,16 +1,71 @@ | |||
| 1 | if ARCH_U300 | 1 | if ARCH_U300 |
| 2 | 2 | ||
| 3 | menu "ST-Ericsson AB U300/U335 Platform" | 3 | menu "ST-Ericsson AB U300/U330/U335/U365 Platform" |
| 4 | 4 | ||
| 5 | comment "ST-Ericsson Mobile Platform Products" | 5 | comment "ST-Ericsson Mobile Platform Products" |
| 6 | 6 | ||
| 7 | config MACH_U300 | 7 | config MACH_U300 |
| 8 | bool "U300" | 8 | bool "U300" |
| 9 | select PINCTRL | ||
| 10 | select PINCTRL_COH901 | ||
| 11 | select PINCTRL_U300 | ||
| 12 | 9 | ||
| 13 | comment "ST-Ericsson U300/U335 Feature Selections" | 10 | comment "ST-Ericsson U300/U330/U335/U365 Feature Selections" |
| 11 | |||
| 12 | choice | ||
| 13 | prompt "U300/U330/U335/U365 system type" | ||
| 14 | default MACH_U300_BS2X | ||
| 15 | ---help--- | ||
| 16 | You need to select the target system, i.e. the | ||
| 17 | U300/U330/U335/U365 board that you want to compile your kernel | ||
| 18 | for. | ||
| 19 | |||
| 20 | config MACH_U300_BS2X | ||
| 21 | bool "S26/S26/B25/B26 Test Products" | ||
| 22 | depends on MACH_U300 | ||
| 23 | help | ||
| 24 | Select this if you're developing on the | ||
| 25 | S26/S25 test products. (Also works on | ||
| 26 | B26/B25 big boards.) | ||
| 27 | |||
| 28 | config MACH_U300_BS330 | ||
| 29 | bool "S330/B330 Test Products" | ||
| 30 | depends on MACH_U300 | ||
| 31 | help | ||
| 32 | Select this if you're developing on the | ||
| 33 | S330/B330 test products. | ||
| 34 | |||
| 35 | config MACH_U300_BS335 | ||
| 36 | bool "S335/B335 Test Products" | ||
| 37 | depends on MACH_U300 | ||
| 38 | help | ||
| 39 | Select this if you're developing on the | ||
| 40 | S335/B335 test products. | ||
| 41 | |||
| 42 | config MACH_U300_BS365 | ||
| 43 | bool "S365/B365 Test Products" | ||
| 44 | depends on MACH_U300 | ||
| 45 | help | ||
| 46 | Select this if you're developing on the | ||
| 47 | S365/B365 test products. | ||
| 48 | |||
| 49 | endchoice | ||
| 50 | |||
| 51 | choice | ||
| 52 | prompt "Memory configuration" | ||
| 53 | default MACH_U300_SINGLE_RAM | ||
| 54 | ---help--- | ||
| 55 | You have to config the kernel according to the physical memory | ||
| 56 | configuration. | ||
| 57 | |||
| 58 | config MACH_U300_SINGLE_RAM | ||
| 59 | bool "Single RAM" | ||
| 60 | help | ||
| 61 | Select this if you want support for Single RAM phones. | ||
| 62 | |||
| 63 | config MACH_U300_DUAL_RAM | ||
| 64 | bool "Dual RAM" | ||
| 65 | help | ||
| 66 | Select this if you want support for Dual RAM phones. | ||
| 67 | This is two RAM memories on different EMIFs. | ||
| 68 | endchoice | ||
| 14 | 69 | ||
| 15 | config U300_DEBUG | 70 | config U300_DEBUG |
| 16 | bool "Debug support for U300" | 71 | bool "Debug support for U300" |
| @@ -18,6 +73,14 @@ config U300_DEBUG | |||
| 18 | help | 73 | help |
| 19 | Debug support for U300 in sysfs, procfs etc. | 74 | Debug support for U300 in sysfs, procfs etc. |
| 20 | 75 | ||
| 76 | config MACH_U300_SEMI_IS_SHARED | ||
| 77 | bool "The SEMI is used by both the access and application side" | ||
| 78 | depends on MACH_U300 | ||
| 79 | help | ||
| 80 | This makes it possible to use the SEMI (Shared External | ||
| 81 | Memory Interface) from both from access and application | ||
| 82 | side. | ||
| 83 | |||
| 21 | config MACH_U300_SPIDUMMY | 84 | config MACH_U300_SPIDUMMY |
| 22 | bool "SSP/SPI dummy chip" | 85 | bool "SSP/SPI dummy chip" |
| 23 | select SPI | 86 | select SPI |
| @@ -30,6 +93,25 @@ config MACH_U300_SPIDUMMY | |||
| 30 | you don't need it. Selecting this will activate the | 93 | you don't need it. Selecting this will activate the |
| 31 | SPI framework and ARM PL022 support. | 94 | SPI framework and ARM PL022 support. |
| 32 | 95 | ||
| 96 | comment "All the settings below must match the bootloader's settings" | ||
| 97 | |||
| 98 | config MACH_U300_ACCESS_MEM_SIZE | ||
| 99 | int "Access CPU memory allocation" | ||
| 100 | range 7 25 | ||
| 101 | depends on MACH_U300_SINGLE_RAM | ||
| 102 | default 13 | ||
| 103 | help | ||
| 104 | How much memory in MiB that the Access side CPU has allocated | ||
| 105 | |||
| 106 | config MACH_U300_2MB_ALIGNMENT_FIX | ||
| 107 | bool "2MiB alignment fix" | ||
| 108 | depends on MACH_U300_SINGLE_RAM | ||
| 109 | default y | ||
| 110 | help | ||
| 111 | If yes and the Access side CPU has allocated an odd size in | ||
| 112 | MiB, this fix gives you one MiB extra that would otherwise be | ||
| 113 | lost due to Linux 2 MiB alignment policy. | ||
| 114 | |||
| 33 | endmenu | 115 | endmenu |
| 34 | 116 | ||
| 35 | endif | 117 | endif |
diff --git a/arch/arm/mach-u300/Makefile b/arch/arm/mach-u300/Makefile index 5a86c58da39..8fd354aaf0a 100644 --- a/arch/arm/mach-u300/Makefile +++ b/arch/arm/mach-u300/Makefile | |||
| @@ -2,11 +2,13 @@ | |||
| 2 | # Makefile for the linux kernel, U300 machine. | 2 | # Makefile for the linux kernel, U300 machine. |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | obj-y := core.o timer.o | 5 | obj-y := core.o clock.o timer.o padmux.o |
| 6 | obj-m := | 6 | obj-m := |
| 7 | obj-n := | 7 | obj-n := |
| 8 | obj- := | 8 | obj- := |
| 9 | 9 | ||
| 10 | obj-$(CONFIG_ARCH_U300) += u300.o | ||
| 11 | obj-$(CONFIG_MMC) += mmc.o | ||
| 10 | obj-$(CONFIG_SPI_PL022) += spi.o | 12 | obj-$(CONFIG_SPI_PL022) += spi.o |
| 11 | obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o | 13 | obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o |
| 12 | obj-$(CONFIG_I2C_STU300) += i2c.o | 14 | obj-$(CONFIG_I2C_STU300) += i2c.o |
diff --git a/arch/arm/mach-u300/Makefile.boot b/arch/arm/mach-u300/Makefile.boot index 87811de0bd9..6fbfc6ea2d3 100644 --- a/arch/arm/mach-u300/Makefile.boot +++ b/arch/arm/mach-u300/Makefile.boot | |||
| @@ -1,4 +1,15 @@ | |||
| 1 | zreladdr-y += 0x48008000 | 1 | # Note: the following conditions must always be true: |
| 2 | params_phys-y := 0x48000100 | 2 | # ZRELADDR == virt_to_phys(TEXTADDR) |
| 3 | # PARAMS_PHYS must be within 4MB of ZRELADDR | ||
| 4 | # INITRD_PHYS must be in RAM | ||
| 5 | |||
| 6 | ifdef CONFIG_MACH_U300_SINGLE_RAM | ||
| 7 | zreladdr-y := 0x28E08000 | ||
| 8 | params_phys-y := 0x28E00100 | ||
| 9 | else | ||
| 10 | zreladdr-y := 0x48008000 | ||
| 11 | params_phys-y := 0x48000100 | ||
| 12 | endif | ||
| 13 | |||
| 3 | # This isn't used. | 14 | # This isn't used. |
| 4 | #initrd_phys-y := 0x48800000 | 15 | #initrd_phys-y := 0x29800000 |
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 4ce77cdc31c..399c89f14df 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * arch/arm/mach-u300/core.c | 3 | * arch/arm/mach-u300/core.c |
| 4 | * | 4 | * |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2007-2012 ST-Ericsson SA | 6 | * Copyright (C) 2007-2010 ST-Ericsson SA |
| 7 | * License terms: GNU General Public License (GPL) version 2 | 7 | * License terms: GNU General Public License (GPL) version 2 |
| 8 | * Core platform support, IRQ handling and device definitions. | 8 | * Core platform support, IRQ handling and device definitions. |
| 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
| @@ -18,7 +18,6 @@ | |||
| 18 | #include <linux/termios.h> | 18 | #include <linux/termios.h> |
| 19 | #include <linux/dmaengine.h> | 19 | #include <linux/dmaengine.h> |
| 20 | #include <linux/amba/bus.h> | 20 | #include <linux/amba/bus.h> |
| 21 | #include <linux/amba/mmci.h> | ||
| 22 | #include <linux/amba/serial.h> | 21 | #include <linux/amba/serial.h> |
| 23 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
| 24 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
| @@ -26,30 +25,23 @@ | |||
| 26 | #include <linux/err.h> | 25 | #include <linux/err.h> |
| 27 | #include <linux/mtd/nand.h> | 26 | #include <linux/mtd/nand.h> |
| 28 | #include <linux/mtd/fsmc.h> | 27 | #include <linux/mtd/fsmc.h> |
| 29 | #include <linux/pinctrl/machine.h> | ||
| 30 | #include <linux/pinctrl/pinconf-generic.h> | ||
| 31 | #include <linux/dma-mapping.h> | ||
| 32 | #include <linux/platform_data/clk-u300.h> | ||
| 33 | #include <linux/platform_data/pinctrl-coh901.h> | ||
| 34 | 28 | ||
| 35 | #include <asm/types.h> | 29 | #include <asm/types.h> |
| 36 | #include <asm/setup.h> | 30 | #include <asm/setup.h> |
| 37 | #include <asm/memory.h> | 31 | #include <asm/memory.h> |
| 38 | #include <asm/hardware/vic.h> | 32 | #include <asm/hardware/vic.h> |
| 39 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
| 40 | #include <asm/mach-types.h> | 34 | #include <asm/mach/irq.h> |
| 41 | #include <asm/mach/arch.h> | ||
| 42 | 35 | ||
| 43 | #include <mach/coh901318.h> | 36 | #include <mach/coh901318.h> |
| 44 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
| 45 | #include <mach/syscon.h> | 38 | #include <mach/syscon.h> |
| 46 | #include <mach/irqs.h> | 39 | #include <mach/dma_channels.h> |
| 47 | 40 | ||
| 48 | #include "timer.h" | 41 | #include "clock.h" |
| 42 | #include "mmc.h" | ||
| 49 | #include "spi.h" | 43 | #include "spi.h" |
| 50 | #include "i2c.h" | 44 | #include "i2c.h" |
| 51 | #include "u300-gpio.h" | ||
| 52 | #include "dma_channels.h" | ||
| 53 | 45 | ||
| 54 | /* | 46 | /* |
| 55 | * Static I/O mappings that are needed for booting the U300 platforms. The | 47 | * Static I/O mappings that are needed for booting the U300 platforms. The |
| @@ -76,9 +68,28 @@ static struct map_desc u300_io_desc[] __initdata = { | |||
| 76 | .length = SZ_32K, | 68 | .length = SZ_32K, |
| 77 | .type = MT_DEVICE, | 69 | .type = MT_DEVICE, |
| 78 | }, | 70 | }, |
| 71 | { | ||
| 72 | .virtual = 0xffff2000, /* TCM memory */ | ||
| 73 | .pfn = __phys_to_pfn(0xffff2000), | ||
| 74 | .length = SZ_16K, | ||
| 75 | .type = MT_DEVICE, | ||
| 76 | }, | ||
| 77 | |||
| 78 | /* | ||
| 79 | * This overlaps with the IRQ vectors etc at 0xffff0000, so these | ||
| 80 | * may have to be moved to 0x00000000 in order to use the ROM. | ||
| 81 | */ | ||
| 82 | /* | ||
| 83 | { | ||
| 84 | .virtual = U300_BOOTROM_VIRT_BASE, | ||
| 85 | .pfn = __phys_to_pfn(U300_BOOTROM_PHYS_BASE), | ||
| 86 | .length = SZ_64K, | ||
| 87 | .type = MT_ROM, | ||
| 88 | }, | ||
| 89 | */ | ||
| 79 | }; | 90 | }; |
| 80 | 91 | ||
| 81 | static void __init u300_map_io(void) | 92 | void __init u300_map_io(void) |
| 82 | { | 93 | { |
| 83 | iotable_init(u300_io_desc, ARRAY_SIZE(u300_io_desc)); | 94 | iotable_init(u300_io_desc, ARRAY_SIZE(u300_io_desc)); |
| 84 | } | 95 | } |
| @@ -96,11 +107,22 @@ static struct amba_pl011_data uart0_plat_data = { | |||
| 96 | #endif | 107 | #endif |
| 97 | }; | 108 | }; |
| 98 | 109 | ||
| 99 | /* Slow device at 0x3000 offset */ | 110 | static struct amba_device uart0_device = { |
| 100 | static AMBA_APB_DEVICE(uart0, "uart0", 0, U300_UART0_BASE, | 111 | .dev = { |
| 101 | { IRQ_U300_UART0 }, &uart0_plat_data); | 112 | .coherent_dma_mask = ~0, |
| 113 | .init_name = "uart0", /* Slow device at 0x3000 offset */ | ||
| 114 | .platform_data = &uart0_plat_data, | ||
| 115 | }, | ||
| 116 | .res = { | ||
| 117 | .start = U300_UART0_BASE, | ||
| 118 | .end = U300_UART0_BASE + SZ_4K - 1, | ||
| 119 | .flags = IORESOURCE_MEM, | ||
| 120 | }, | ||
| 121 | .irq = { IRQ_U300_UART0, NO_IRQ }, | ||
| 122 | }; | ||
| 102 | 123 | ||
| 103 | /* The U335 have an additional UART1 on the APP CPU */ | 124 | /* The U335 have an additional UART1 on the APP CPU */ |
| 125 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 104 | static struct amba_pl011_data uart1_plat_data = { | 126 | static struct amba_pl011_data uart1_plat_data = { |
| 105 | #ifdef CONFIG_COH901318 | 127 | #ifdef CONFIG_COH901318 |
| 106 | .dma_filter = coh901318_filter_id, | 128 | .dma_filter = coh901318_filter_id, |
| @@ -109,40 +131,71 @@ static struct amba_pl011_data uart1_plat_data = { | |||
| 109 | #endif | 131 | #endif |
| 110 | }; | 132 | }; |
| 111 | 133 | ||
| 112 | /* Fast device at 0x7000 offset */ | 134 | static struct amba_device uart1_device = { |
| 113 | static AMBA_APB_DEVICE(uart1, "uart1", 0, U300_UART1_BASE, | 135 | .dev = { |
| 114 | { IRQ_U300_UART1 }, &uart1_plat_data); | 136 | .coherent_dma_mask = ~0, |
| 115 | 137 | .init_name = "uart1", /* Fast device at 0x7000 offset */ | |
| 116 | /* AHB device at 0x4000 offset */ | 138 | .platform_data = &uart1_plat_data, |
| 117 | static AMBA_APB_DEVICE(pl172, "pl172", 0, U300_EMIF_CFG_BASE, { }, NULL); | 139 | }, |
| 140 | .res = { | ||
| 141 | .start = U300_UART1_BASE, | ||
| 142 | .end = U300_UART1_BASE + SZ_4K - 1, | ||
| 143 | .flags = IORESOURCE_MEM, | ||
| 144 | }, | ||
| 145 | .irq = { IRQ_U300_UART1, NO_IRQ }, | ||
| 146 | }; | ||
| 147 | #endif | ||
| 118 | 148 | ||
| 119 | /* Fast device at 0x6000 offset */ | 149 | static struct amba_device pl172_device = { |
| 120 | static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE, | 150 | .dev = { |
| 121 | { IRQ_U300_SPI }, NULL); | 151 | .init_name = "pl172", /* AHB device at 0x4000 offset */ |
| 152 | .platform_data = NULL, | ||
| 153 | }, | ||
| 154 | .res = { | ||
| 155 | .start = U300_EMIF_CFG_BASE, | ||
| 156 | .end = U300_EMIF_CFG_BASE + SZ_4K - 1, | ||
| 157 | .flags = IORESOURCE_MEM, | ||
| 158 | }, | ||
| 159 | }; | ||
| 122 | 160 | ||
| 123 | /* Fast device at 0x1000 offset */ | ||
| 124 | #define U300_MMCSD_IRQS { IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 } | ||
| 125 | 161 | ||
| 126 | static struct mmci_platform_data mmcsd_platform_data = { | 162 | /* |
| 163 | * Everything within this next ifdef deals with external devices connected to | ||
| 164 | * the APP SPI bus. | ||
| 165 | */ | ||
| 166 | static struct amba_device pl022_device = { | ||
| 167 | .dev = { | ||
| 168 | .coherent_dma_mask = ~0, | ||
| 169 | .init_name = "pl022", /* Fast device at 0x6000 offset */ | ||
| 170 | }, | ||
| 171 | .res = { | ||
| 172 | .start = U300_SPI_BASE, | ||
| 173 | .end = U300_SPI_BASE + SZ_4K - 1, | ||
| 174 | .flags = IORESOURCE_MEM, | ||
| 175 | }, | ||
| 176 | .irq = {IRQ_U300_SPI, NO_IRQ }, | ||
| 127 | /* | 177 | /* |
| 128 | * Do not set ocr_mask or voltage translation function, | 178 | * This device has a DMA channel but the Linux driver does not use |
| 129 | * we have a regulator we can control instead. | 179 | * it currently. |
| 130 | */ | 180 | */ |
| 131 | .f_max = 24000000, | ||
| 132 | .gpio_wp = -1, | ||
| 133 | .gpio_cd = U300_GPIO_PIN_MMC_CD, | ||
| 134 | .cd_invert = true, | ||
| 135 | .capabilities = MMC_CAP_MMC_HIGHSPEED | | ||
| 136 | MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, | ||
| 137 | #ifdef CONFIG_COH901318 | ||
| 138 | .dma_filter = coh901318_filter_id, | ||
| 139 | .dma_rx_param = (void *) U300_DMA_MMCSD_RX_TX, | ||
| 140 | /* Don't specify a TX channel, this RX channel is bidirectional */ | ||
| 141 | #endif | ||
| 142 | }; | 181 | }; |
| 143 | 182 | ||
| 144 | static AMBA_APB_DEVICE(mmcsd, "mmci", 0, U300_MMCSD_BASE, | 183 | static struct amba_device mmcsd_device = { |
| 145 | U300_MMCSD_IRQS, &mmcsd_platform_data); | 184 | .dev = { |
| 185 | .init_name = "mmci", /* Fast device at 0x1000 offset */ | ||
| 186 | .platform_data = NULL, /* Added later */ | ||
| 187 | }, | ||
| 188 | .res = { | ||
| 189 | .start = U300_MMCSD_BASE, | ||
| 190 | .end = U300_MMCSD_BASE + SZ_4K - 1, | ||
| 191 | .flags = IORESOURCE_MEM, | ||
| 192 | }, | ||
| 193 | .irq = {IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 }, | ||
| 194 | /* | ||
| 195 | * This device has a DMA channel but the Linux driver does not use | ||
| 196 | * it currently. | ||
| 197 | */ | ||
| 198 | }; | ||
| 146 | 199 | ||
| 147 | /* | 200 | /* |
| 148 | * The order of device declaration may be important, since some devices | 201 | * The order of device declaration may be important, since some devices |
| @@ -150,7 +203,9 @@ static AMBA_APB_DEVICE(mmcsd, "mmci", 0, U300_MMCSD_BASE, | |||
| 150 | */ | 203 | */ |
| 151 | static struct amba_device *amba_devs[] __initdata = { | 204 | static struct amba_device *amba_devs[] __initdata = { |
| 152 | &uart0_device, | 205 | &uart0_device, |
| 206 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 153 | &uart1_device, | 207 | &uart1_device, |
| 208 | #endif | ||
| 154 | &pl022_device, | 209 | &pl022_device, |
| 155 | &pl172_device, | 210 | &pl172_device, |
| 156 | &mmcsd_device, | 211 | &mmcsd_device, |
| @@ -184,6 +239,7 @@ static struct resource gpio_resources[] = { | |||
| 184 | .end = IRQ_U300_GPIO_PORT2, | 239 | .end = IRQ_U300_GPIO_PORT2, |
| 185 | .flags = IORESOURCE_IRQ, | 240 | .flags = IORESOURCE_IRQ, |
| 186 | }, | 241 | }, |
| 242 | #ifdef U300_COH901571_3 | ||
| 187 | { | 243 | { |
| 188 | .name = "gpio3", | 244 | .name = "gpio3", |
| 189 | .start = IRQ_U300_GPIO_PORT3, | 245 | .start = IRQ_U300_GPIO_PORT3, |
| @@ -196,6 +252,7 @@ static struct resource gpio_resources[] = { | |||
| 196 | .end = IRQ_U300_GPIO_PORT4, | 252 | .end = IRQ_U300_GPIO_PORT4, |
| 197 | .flags = IORESOURCE_IRQ, | 253 | .flags = IORESOURCE_IRQ, |
| 198 | }, | 254 | }, |
| 255 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 199 | { | 256 | { |
| 200 | .name = "gpio5", | 257 | .name = "gpio5", |
| 201 | .start = IRQ_U300_GPIO_PORT5, | 258 | .start = IRQ_U300_GPIO_PORT5, |
| @@ -208,6 +265,8 @@ static struct resource gpio_resources[] = { | |||
| 208 | .end = IRQ_U300_GPIO_PORT6, | 265 | .end = IRQ_U300_GPIO_PORT6, |
| 209 | .flags = IORESOURCE_IRQ, | 266 | .flags = IORESOURCE_IRQ, |
| 210 | }, | 267 | }, |
| 268 | #endif /* CONFIG_MACH_U300_BS335 */ | ||
| 269 | #endif /* U300_COH901571_3 */ | ||
| 211 | }; | 270 | }; |
| 212 | 271 | ||
| 213 | static struct resource keypad_resources[] = { | 272 | static struct resource keypad_resources[] = { |
| @@ -249,18 +308,6 @@ static struct resource rtc_resources[] = { | |||
| 249 | */ | 308 | */ |
| 250 | static struct resource fsmc_resources[] = { | 309 | static struct resource fsmc_resources[] = { |
| 251 | { | 310 | { |
| 252 | .name = "nand_addr", | ||
| 253 | .start = U300_NAND_CS0_PHYS_BASE + PLAT_NAND_ALE, | ||
| 254 | .end = U300_NAND_CS0_PHYS_BASE + PLAT_NAND_ALE + SZ_16K - 1, | ||
| 255 | .flags = IORESOURCE_MEM, | ||
| 256 | }, | ||
| 257 | { | ||
| 258 | .name = "nand_cmd", | ||
| 259 | .start = U300_NAND_CS0_PHYS_BASE + PLAT_NAND_CLE, | ||
| 260 | .end = U300_NAND_CS0_PHYS_BASE + PLAT_NAND_CLE + SZ_16K - 1, | ||
| 261 | .flags = IORESOURCE_MEM, | ||
| 262 | }, | ||
| 263 | { | ||
| 264 | .name = "nand_data", | 311 | .name = "nand_data", |
| 265 | .start = U300_NAND_CS0_PHYS_BASE, | 312 | .start = U300_NAND_CS0_PHYS_BASE, |
| 266 | .end = U300_NAND_CS0_PHYS_BASE + SZ_16K - 1, | 313 | .end = U300_NAND_CS0_PHYS_BASE + SZ_16K - 1, |
| @@ -314,6 +361,51 @@ static struct resource wdog_resources[] = { | |||
| 314 | } | 361 | } |
| 315 | }; | 362 | }; |
| 316 | 363 | ||
| 364 | /* TODO: These should be protected by suitable #ifdef's */ | ||
| 365 | static struct resource ave_resources[] = { | ||
| 366 | { | ||
| 367 | .name = "AVE3e I/O Area", | ||
| 368 | .start = U300_VIDEOENC_BASE, | ||
| 369 | .end = U300_VIDEOENC_BASE + SZ_512K - 1, | ||
| 370 | .flags = IORESOURCE_MEM, | ||
| 371 | }, | ||
| 372 | { | ||
| 373 | .name = "AVE3e IRQ0", | ||
| 374 | .start = IRQ_U300_VIDEO_ENC_0, | ||
| 375 | .end = IRQ_U300_VIDEO_ENC_0, | ||
| 376 | .flags = IORESOURCE_IRQ, | ||
| 377 | }, | ||
| 378 | { | ||
| 379 | .name = "AVE3e IRQ1", | ||
| 380 | .start = IRQ_U300_VIDEO_ENC_1, | ||
| 381 | .end = IRQ_U300_VIDEO_ENC_1, | ||
| 382 | .flags = IORESOURCE_IRQ, | ||
| 383 | }, | ||
| 384 | { | ||
| 385 | .name = "AVE3e Physmem Area", | ||
| 386 | .start = 0, /* 0 will be remapped to reserved memory */ | ||
| 387 | .end = SZ_1M - 1, | ||
| 388 | .flags = IORESOURCE_MEM, | ||
| 389 | }, | ||
| 390 | /* | ||
| 391 | * The AVE3e requires two regions of 256MB that it considers | ||
| 392 | * "invisible". The hardware will not be able to access these | ||
| 393 | * addresses, so they should never point to system RAM. | ||
| 394 | */ | ||
| 395 | { | ||
| 396 | .name = "AVE3e Reserved 0", | ||
| 397 | .start = 0xd0000000, | ||
| 398 | .end = 0xd0000000 + SZ_256M - 1, | ||
| 399 | .flags = IORESOURCE_MEM, | ||
| 400 | }, | ||
| 401 | { | ||
| 402 | .name = "AVE3e Reserved 1", | ||
| 403 | .start = 0xe0000000, | ||
| 404 | .end = 0xe0000000 + SZ_256M - 1, | ||
| 405 | .flags = IORESOURCE_MEM, | ||
| 406 | }, | ||
| 407 | }; | ||
| 408 | |||
| 317 | static struct resource dma_resource[] = { | 409 | static struct resource dma_resource[] = { |
| 318 | { | 410 | { |
| 319 | .start = U300_DMAC_BASE, | 411 | .start = U300_DMAC_BASE, |
| @@ -327,6 +419,7 @@ static struct resource dma_resource[] = { | |||
| 327 | } | 419 | } |
| 328 | }; | 420 | }; |
| 329 | 421 | ||
| 422 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 330 | /* points out all dma slave channels. | 423 | /* points out all dma slave channels. |
| 331 | * Syntax is [A1, B1, A2, B2, .... ,-1,-1] | 424 | * Syntax is [A1, B1, A2, B2, .... ,-1,-1] |
| 332 | * Select all channels from A to B, end of list is marked with -1,-1 | 425 | * Select all channels from A to B, end of list is marked with -1,-1 |
| @@ -339,6 +432,14 @@ static int dma_slave_channels[] = { | |||
| 339 | static int dma_memcpy_channels[] = { | 432 | static int dma_memcpy_channels[] = { |
| 340 | U300_DMA_GENERAL_PURPOSE_0, U300_DMA_GENERAL_PURPOSE_8, -1, -1}; | 433 | U300_DMA_GENERAL_PURPOSE_0, U300_DMA_GENERAL_PURPOSE_8, -1, -1}; |
| 341 | 434 | ||
| 435 | #else /* CONFIG_MACH_U300_BS335 */ | ||
| 436 | |||
| 437 | static int dma_slave_channels[] = {U300_DMA_MSL_TX_0, U300_DMA_SPI_RX, -1, -1}; | ||
| 438 | static int dma_memcpy_channels[] = { | ||
| 439 | U300_DMA_GENERAL_PURPOSE_0, U300_DMA_GENERAL_PURPOSE_10, -1, -1}; | ||
| 440 | |||
| 441 | #endif | ||
| 442 | |||
| 342 | /** register dma for memory access | 443 | /** register dma for memory access |
| 343 | * | 444 | * |
| 344 | * active 1 means dma intends to access memory | 445 | * active 1 means dma intends to access memory |
| @@ -1390,6 +1491,7 @@ const struct coh_dma_channel chan_config[U300_DMA_CHANNELS] = { | |||
| 1390 | .param.ctrl_lli = flags_memcpy_lli, | 1491 | .param.ctrl_lli = flags_memcpy_lli, |
| 1391 | .param.ctrl_lli_last = flags_memcpy_lli_last, | 1492 | .param.ctrl_lli_last = flags_memcpy_lli_last, |
| 1392 | }, | 1493 | }, |
| 1494 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 1393 | { | 1495 | { |
| 1394 | .number = U300_DMA_UART1_TX, | 1496 | .number = U300_DMA_UART1_TX, |
| 1395 | .name = "UART1 TX", | 1497 | .name = "UART1 TX", |
| @@ -1400,6 +1502,28 @@ const struct coh_dma_channel chan_config[U300_DMA_CHANNELS] = { | |||
| 1400 | .name = "UART1 RX", | 1502 | .name = "UART1 RX", |
| 1401 | .priority_high = 0, | 1503 | .priority_high = 0, |
| 1402 | } | 1504 | } |
| 1505 | #else | ||
| 1506 | { | ||
| 1507 | .number = U300_DMA_GENERAL_PURPOSE_9, | ||
| 1508 | .name = "GENERAL 09", | ||
| 1509 | .priority_high = 0, | ||
| 1510 | |||
| 1511 | .param.config = flags_memcpy_config, | ||
| 1512 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
| 1513 | .param.ctrl_lli = flags_memcpy_lli, | ||
| 1514 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
| 1515 | }, | ||
| 1516 | { | ||
| 1517 | .number = U300_DMA_GENERAL_PURPOSE_10, | ||
| 1518 | .name = "GENERAL 10", | ||
| 1519 | .priority_high = 0, | ||
| 1520 | |||
| 1521 | .param.config = flags_memcpy_config, | ||
| 1522 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
| 1523 | .param.ctrl_lli = flags_memcpy_lli, | ||
| 1524 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
| 1525 | } | ||
| 1526 | #endif | ||
| 1403 | }; | 1527 | }; |
| 1404 | 1528 | ||
| 1405 | 1529 | ||
| @@ -1411,14 +1535,6 @@ static struct coh901318_platform coh901318_platform = { | |||
| 1411 | .max_channels = U300_DMA_CHANNELS, | 1535 | .max_channels = U300_DMA_CHANNELS, |
| 1412 | }; | 1536 | }; |
| 1413 | 1537 | ||
| 1414 | static struct resource pinctrl_resources[] = { | ||
| 1415 | { | ||
| 1416 | .start = U300_SYSCON_BASE, | ||
| 1417 | .end = U300_SYSCON_BASE + SZ_4K - 1, | ||
| 1418 | .flags = IORESOURCE_MEM, | ||
| 1419 | }, | ||
| 1420 | }; | ||
| 1421 | |||
| 1422 | static struct platform_device wdog_device = { | 1538 | static struct platform_device wdog_device = { |
| 1423 | .name = "coh901327_wdog", | 1539 | .name = "coh901327_wdog", |
| 1424 | .id = -1, | 1540 | .id = -1, |
| @@ -1440,30 +1556,11 @@ static struct platform_device i2c1_device = { | |||
| 1440 | .resource = i2c1_resources, | 1556 | .resource = i2c1_resources, |
| 1441 | }; | 1557 | }; |
| 1442 | 1558 | ||
| 1443 | static struct platform_device pinctrl_device = { | ||
| 1444 | .name = "pinctrl-u300", | ||
| 1445 | .id = -1, | ||
| 1446 | .num_resources = ARRAY_SIZE(pinctrl_resources), | ||
| 1447 | .resource = pinctrl_resources, | ||
| 1448 | }; | ||
| 1449 | |||
| 1450 | /* | ||
| 1451 | * The different variants have a few different versions of the | ||
| 1452 | * GPIO block, with different number of ports. | ||
| 1453 | */ | ||
| 1454 | static struct u300_gpio_platform u300_gpio_plat = { | ||
| 1455 | .ports = 7, | ||
| 1456 | .gpio_base = 0, | ||
| 1457 | }; | ||
| 1458 | |||
| 1459 | static struct platform_device gpio_device = { | 1559 | static struct platform_device gpio_device = { |
| 1460 | .name = "u300-gpio", | 1560 | .name = "u300-gpio", |
| 1461 | .id = -1, | 1561 | .id = -1, |
| 1462 | .num_resources = ARRAY_SIZE(gpio_resources), | 1562 | .num_resources = ARRAY_SIZE(gpio_resources), |
| 1463 | .resource = gpio_resources, | 1563 | .resource = gpio_resources, |
| 1464 | .dev = { | ||
| 1465 | .platform_data = &u300_gpio_plat, | ||
| 1466 | }, | ||
| 1467 | }; | 1564 | }; |
| 1468 | 1565 | ||
| 1469 | static struct platform_device keypad_device = { | 1566 | static struct platform_device keypad_device = { |
| @@ -1515,6 +1612,13 @@ static struct platform_device nand_device = { | |||
| 1515 | }, | 1612 | }, |
| 1516 | }; | 1613 | }; |
| 1517 | 1614 | ||
| 1615 | static struct platform_device ave_device = { | ||
| 1616 | .name = "video_enc", | ||
| 1617 | .id = -1, | ||
| 1618 | .num_resources = ARRAY_SIZE(ave_resources), | ||
| 1619 | .resource = ave_resources, | ||
| 1620 | }; | ||
| 1621 | |||
| 1518 | static struct platform_device dma_device = { | 1622 | static struct platform_device dma_device = { |
| 1519 | .name = "coh901318", | 1623 | .name = "coh901318", |
| 1520 | .id = -1, | 1624 | .id = -1, |
| @@ -1526,32 +1630,6 @@ static struct platform_device dma_device = { | |||
| 1526 | }, | 1630 | }, |
| 1527 | }; | 1631 | }; |
| 1528 | 1632 | ||
| 1529 | static unsigned long pin_pullup_conf[] = { | ||
| 1530 | PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_UP, 1), | ||
| 1531 | }; | ||
| 1532 | |||
| 1533 | static unsigned long pin_highz_conf[] = { | ||
| 1534 | PIN_CONF_PACKED(PIN_CONFIG_BIAS_HIGH_IMPEDANCE, 0), | ||
| 1535 | }; | ||
| 1536 | |||
| 1537 | /* Pin control settings */ | ||
| 1538 | static struct pinctrl_map __initdata u300_pinmux_map[] = { | ||
| 1539 | /* anonymous maps for chip power and EMIFs */ | ||
| 1540 | PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-u300", NULL, "power"), | ||
| 1541 | PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-u300", NULL, "emif0"), | ||
| 1542 | PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-u300", NULL, "emif1"), | ||
| 1543 | /* per-device maps for MMC/SD, SPI and UART */ | ||
| 1544 | PIN_MAP_MUX_GROUP_DEFAULT("mmci", "pinctrl-u300", NULL, "mmc0"), | ||
| 1545 | PIN_MAP_MUX_GROUP_DEFAULT("pl022", "pinctrl-u300", NULL, "spi0"), | ||
| 1546 | PIN_MAP_MUX_GROUP_DEFAULT("uart0", "pinctrl-u300", NULL, "uart0"), | ||
| 1547 | /* This pin is used for clock return rather than GPIO */ | ||
| 1548 | PIN_MAP_CONFIGS_PIN_DEFAULT("mmci", "pinctrl-u300", "PIO APP GPIO 11", | ||
| 1549 | pin_pullup_conf), | ||
| 1550 | /* This pin is used for card detect */ | ||
| 1551 | PIN_MAP_CONFIGS_PIN_DEFAULT("mmci", "pinctrl-u300", "PIO MS INS", | ||
| 1552 | pin_highz_conf), | ||
| 1553 | }; | ||
| 1554 | |||
| 1555 | /* | 1633 | /* |
| 1556 | * Notice that AMBA devices are initialized before platform devices. | 1634 | * Notice that AMBA devices are initialized before platform devices. |
| 1557 | * | 1635 | * |
| @@ -1562,45 +1640,36 @@ static struct platform_device *platform_devs[] __initdata = { | |||
| 1562 | &i2c1_device, | 1640 | &i2c1_device, |
| 1563 | &keypad_device, | 1641 | &keypad_device, |
| 1564 | &rtc_device, | 1642 | &rtc_device, |
| 1565 | &pinctrl_device, | ||
| 1566 | &gpio_device, | 1643 | &gpio_device, |
| 1567 | &nand_device, | 1644 | &nand_device, |
| 1568 | &wdog_device, | 1645 | &wdog_device, |
| 1646 | &ave_device | ||
| 1569 | }; | 1647 | }; |
| 1570 | 1648 | ||
| 1649 | |||
| 1571 | /* | 1650 | /* |
| 1572 | * Interrupts: the U300 platforms have two pl190 ARM PrimeCells connected | 1651 | * Interrupts: the U300 platforms have two pl190 ARM PrimeCells connected |
| 1573 | * together so some interrupts are connected to the first one and some | 1652 | * together so some interrupts are connected to the first one and some |
| 1574 | * to the second one. | 1653 | * to the second one. |
| 1575 | */ | 1654 | */ |
| 1576 | static void __init u300_init_irq(void) | 1655 | void __init u300_init_irq(void) |
| 1577 | { | 1656 | { |
| 1578 | u32 mask[2] = {0, 0}; | 1657 | u32 mask[2] = {0, 0}; |
| 1579 | struct clk *clk; | 1658 | struct clk *clk; |
| 1580 | int i; | 1659 | int i; |
| 1581 | 1660 | ||
| 1582 | /* initialize clocking early, we want to clock the INTCON */ | 1661 | /* initialize clocking early, we want to clock the INTCON */ |
| 1583 | u300_clk_init(U300_SYSCON_VBASE); | 1662 | u300_clock_init(); |
| 1584 | |||
| 1585 | /* Bootstrap EMIF and SEMI clocks */ | ||
| 1586 | clk = clk_get_sys("pl172", NULL); | ||
| 1587 | BUG_ON(IS_ERR(clk)); | ||
| 1588 | clk_prepare_enable(clk); | ||
| 1589 | clk = clk_get_sys("semi", NULL); | ||
| 1590 | BUG_ON(IS_ERR(clk)); | ||
| 1591 | clk_prepare_enable(clk); | ||
| 1592 | 1663 | ||
| 1593 | /* Clock the interrupt controller */ | 1664 | /* Clock the interrupt controller */ |
| 1594 | clk = clk_get_sys("intcon", NULL); | 1665 | clk = clk_get_sys("intcon", NULL); |
| 1595 | BUG_ON(IS_ERR(clk)); | 1666 | BUG_ON(IS_ERR(clk)); |
| 1596 | clk_prepare_enable(clk); | 1667 | clk_enable(clk); |
| 1597 | 1668 | ||
| 1598 | for (i = 0; i < U300_VIC_IRQS_END; i++) | 1669 | for (i = 0; i < NR_IRQS; i++) |
| 1599 | set_bit(i, (unsigned long *) &mask[0]); | 1670 | set_bit(i, (unsigned long *) &mask[0]); |
| 1600 | vic_init((void __iomem *) U300_INTCON0_VBASE, IRQ_U300_INTCON0_START, | 1671 | vic_init((void __iomem *) U300_INTCON0_VBASE, 0, mask[0], mask[0]); |
| 1601 | mask[0], mask[0]); | 1672 | vic_init((void __iomem *) U300_INTCON1_VBASE, 32, mask[1], mask[1]); |
| 1602 | vic_init((void __iomem *) U300_INTCON1_VBASE, IRQ_U300_INTCON1_START, | ||
| 1603 | mask[1], mask[1]); | ||
| 1604 | } | 1673 | } |
| 1605 | 1674 | ||
| 1606 | 1675 | ||
| @@ -1678,11 +1747,29 @@ static void __init u300_init_check_chip(void) | |||
| 1678 | printk(KERN_INFO "Initializing U300 system on %s baseband chip " \ | 1747 | printk(KERN_INFO "Initializing U300 system on %s baseband chip " \ |
| 1679 | "(chip ID 0x%04x)\n", chipname, val); | 1748 | "(chip ID 0x%04x)\n", chipname, val); |
| 1680 | 1749 | ||
| 1750 | #ifdef CONFIG_MACH_U300_BS330 | ||
| 1751 | if ((val & 0xFF00U) != 0xd800) { | ||
| 1752 | printk(KERN_ERR "Platform configured for BS330 " \ | ||
| 1753 | "with DB3200 but %s detected, expect problems!", | ||
| 1754 | chipname); | ||
| 1755 | } | ||
| 1756 | #endif | ||
| 1757 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 1681 | if ((val & 0xFF00U) != 0xf000 && (val & 0xFF00U) != 0xf100) { | 1758 | if ((val & 0xFF00U) != 0xf000 && (val & 0xFF00U) != 0xf100) { |
| 1682 | printk(KERN_ERR "Platform configured for BS335 " \ | 1759 | printk(KERN_ERR "Platform configured for BS335 " \ |
| 1683 | " with DB3350 but %s detected, expect problems!", | 1760 | " with DB3350 but %s detected, expect problems!", |
| 1684 | chipname); | 1761 | chipname); |
| 1685 | } | 1762 | } |
| 1763 | #endif | ||
| 1764 | #ifdef CONFIG_MACH_U300_BS365 | ||
| 1765 | if ((val & 0xFF00U) != 0xe800) { | ||
| 1766 | printk(KERN_ERR "Platform configured for BS365 " \ | ||
| 1767 | "with DB3210 but %s detected, expect problems!", | ||
| 1768 | chipname); | ||
| 1769 | } | ||
| 1770 | #endif | ||
| 1771 | |||
| 1772 | |||
| 1686 | } | 1773 | } |
| 1687 | 1774 | ||
| 1688 | /* | 1775 | /* |
| @@ -1715,7 +1802,7 @@ static void __init u300_assign_physmem(void) | |||
| 1715 | } | 1802 | } |
| 1716 | } | 1803 | } |
| 1717 | 1804 | ||
| 1718 | static void __init u300_init_machine(void) | 1805 | void __init u300_init_devices(void) |
| 1719 | { | 1806 | { |
| 1720 | int i; | 1807 | int i; |
| 1721 | u16 val; | 1808 | u16 val; |
| @@ -1723,6 +1810,13 @@ static void __init u300_init_machine(void) | |||
| 1723 | /* Check what platform we run and print some status information */ | 1810 | /* Check what platform we run and print some status information */ |
| 1724 | u300_init_check_chip(); | 1811 | u300_init_check_chip(); |
| 1725 | 1812 | ||
| 1813 | /* Set system to run at PLL208, max performance, a known state. */ | ||
| 1814 | val = readw(U300_SYSCON_VBASE + U300_SYSCON_CCR); | ||
| 1815 | val &= ~U300_SYSCON_CCR_CLKING_PERFORMANCE_MASK; | ||
| 1816 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); | ||
| 1817 | /* Wait for the PLL208 to lock if not locked in yet */ | ||
| 1818 | while (!(readw(U300_SYSCON_VBASE + U300_SYSCON_CSR) & | ||
| 1819 | U300_SYSCON_CSR_PLL208_LOCK_IND)); | ||
| 1726 | /* Initialize SPI device with some board specifics */ | 1820 | /* Initialize SPI device with some board specifics */ |
| 1727 | u300_spi_init(&pl022_device); | 1821 | u300_spi_init(&pl022_device); |
| 1728 | 1822 | ||
| @@ -1734,10 +1828,6 @@ static void __init u300_init_machine(void) | |||
| 1734 | 1828 | ||
| 1735 | u300_assign_physmem(); | 1829 | u300_assign_physmem(); |
| 1736 | 1830 | ||
| 1737 | /* Initialize pinmuxing */ | ||
| 1738 | pinctrl_register_mappings(u300_pinmux_map, | ||
| 1739 | ARRAY_SIZE(u300_pinmux_map)); | ||
| 1740 | |||
| 1741 | /* Register subdevices on the I2C buses */ | 1831 | /* Register subdevices on the I2C buses */ |
| 1742 | u300_i2c_register_board_devices(); | 1832 | u300_i2c_register_board_devices(); |
| 1743 | 1833 | ||
| @@ -1747,40 +1837,25 @@ static void __init u300_init_machine(void) | |||
| 1747 | /* Register subdevices on the SPI bus */ | 1837 | /* Register subdevices on the SPI bus */ |
| 1748 | u300_spi_register_board_devices(); | 1838 | u300_spi_register_board_devices(); |
| 1749 | 1839 | ||
| 1750 | /* Enable SEMI self refresh */ | 1840 | #ifndef CONFIG_MACH_U300_SEMI_IS_SHARED |
| 1841 | /* | ||
| 1842 | * Enable SEMI self refresh. Self-refresh of the SDRAM is entered when | ||
| 1843 | * both subsystems are requesting this mode. | ||
| 1844 | * If we not share the Acc SDRAM, this is never the case. Therefore | ||
| 1845 | * enable it here from the App side. | ||
| 1846 | */ | ||
| 1751 | val = readw(U300_SYSCON_VBASE + U300_SYSCON_SMCR) | | 1847 | val = readw(U300_SYSCON_VBASE + U300_SYSCON_SMCR) | |
| 1752 | U300_SYSCON_SMCR_SEMI_SREFREQ_ENABLE; | 1848 | U300_SYSCON_SMCR_SEMI_SREFREQ_ENABLE; |
| 1753 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_SMCR); | 1849 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_SMCR); |
| 1850 | #endif /* CONFIG_MACH_U300_SEMI_IS_SHARED */ | ||
| 1754 | } | 1851 | } |
| 1755 | 1852 | ||
| 1756 | /* Forward declare this function from the watchdog */ | 1853 | static int core_module_init(void) |
| 1757 | void coh901327_watchdog_reset(void); | ||
| 1758 | |||
| 1759 | static void u300_restart(char mode, const char *cmd) | ||
| 1760 | { | 1854 | { |
| 1761 | switch (mode) { | 1855 | /* |
| 1762 | case 's': | 1856 | * This needs to be initialized later: it needs the input framework |
| 1763 | case 'h': | 1857 | * to be initialized first. |
| 1764 | #ifdef CONFIG_COH901327_WATCHDOG | 1858 | */ |
| 1765 | coh901327_watchdog_reset(); | 1859 | return mmc_init(&mmcsd_device); |
| 1766 | #endif | ||
| 1767 | break; | ||
| 1768 | default: | ||
| 1769 | /* Do nothing */ | ||
| 1770 | break; | ||
| 1771 | } | ||
| 1772 | /* Wait for system do die/reset. */ | ||
| 1773 | while (1); | ||
| 1774 | } | 1860 | } |
| 1775 | 1861 | module_init(core_module_init); | |
| 1776 | MACHINE_START(U300, "Ericsson AB U335 S335/B335 Prototype Board") | ||
| 1777 | /* Maintainer: Linus Walleij <linus.walleij@stericsson.com> */ | ||
| 1778 | .atag_offset = 0x100, | ||
| 1779 | .map_io = u300_map_io, | ||
| 1780 | .nr_irqs = 0, | ||
| 1781 | .init_irq = u300_init_irq, | ||
| 1782 | .handle_irq = vic_handle_irq, | ||
| 1783 | .timer = &u300_timer, | ||
| 1784 | .init_machine = u300_init_machine, | ||
| 1785 | .restart = u300_restart, | ||
| 1786 | MACHINE_END | ||
diff --git a/arch/arm/mach-u300/dma_channels.h b/arch/arm/mach-u300/dma_channels.h deleted file mode 100644 index 4e8a88fbca4..00000000000 --- a/arch/arm/mach-u300/dma_channels.h +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * | ||
| 3 | * arch/arm/mach-u300/include/mach/dma_channels.h | ||
| 4 | * | ||
| 5 | * | ||
| 6 | * Copyright (C) 2007-2012 ST-Ericsson | ||
| 7 | * License terms: GNU General Public License (GPL) version 2 | ||
| 8 | * Map file for the U300 dma driver. | ||
| 9 | * Author: Per Friden <per.friden@stericsson.com> | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef DMA_CHANNELS_H | ||
| 13 | #define DMA_CHANNELS_H | ||
| 14 | |||
| 15 | #define U300_DMA_MSL_TX_0 0 | ||
| 16 | #define U300_DMA_MSL_TX_1 1 | ||
| 17 | #define U300_DMA_MSL_TX_2 2 | ||
| 18 | #define U300_DMA_MSL_TX_3 3 | ||
| 19 | #define U300_DMA_MSL_TX_4 4 | ||
| 20 | #define U300_DMA_MSL_TX_5 5 | ||
| 21 | #define U300_DMA_MSL_TX_6 6 | ||
| 22 | #define U300_DMA_MSL_RX_0 7 | ||
| 23 | #define U300_DMA_MSL_RX_1 8 | ||
| 24 | #define U300_DMA_MSL_RX_2 9 | ||
| 25 | #define U300_DMA_MSL_RX_3 10 | ||
| 26 | #define U300_DMA_MSL_RX_4 11 | ||
| 27 | #define U300_DMA_MSL_RX_5 12 | ||
| 28 | #define U300_DMA_MSL_RX_6 13 | ||
| 29 | #define U300_DMA_MMCSD_RX_TX 14 | ||
| 30 | #define U300_DMA_MSPRO_TX 15 | ||
| 31 | #define U300_DMA_MSPRO_RX 16 | ||
| 32 | #define U300_DMA_UART0_TX 17 | ||
| 33 | #define U300_DMA_UART0_RX 18 | ||
| 34 | #define U300_DMA_APEX_TX 19 | ||
| 35 | #define U300_DMA_APEX_RX 20 | ||
| 36 | #define U300_DMA_PCM_I2S0_TX 21 | ||
| 37 | #define U300_DMA_PCM_I2S0_RX 22 | ||
| 38 | #define U300_DMA_PCM_I2S1_TX 23 | ||
| 39 | #define U300_DMA_PCM_I2S1_RX 24 | ||
| 40 | #define U300_DMA_XGAM_CDI 25 | ||
| 41 | #define U300_DMA_XGAM_PDI 26 | ||
| 42 | #define U300_DMA_SPI_TX 27 | ||
| 43 | #define U300_DMA_SPI_RX 28 | ||
| 44 | #define U300_DMA_GENERAL_PURPOSE_0 29 | ||
| 45 | #define U300_DMA_GENERAL_PURPOSE_1 30 | ||
| 46 | #define U300_DMA_GENERAL_PURPOSE_2 31 | ||
| 47 | #define U300_DMA_GENERAL_PURPOSE_3 32 | ||
| 48 | #define U300_DMA_GENERAL_PURPOSE_4 33 | ||
| 49 | #define U300_DMA_GENERAL_PURPOSE_5 34 | ||
| 50 | #define U300_DMA_GENERAL_PURPOSE_6 35 | ||
| 51 | #define U300_DMA_GENERAL_PURPOSE_7 36 | ||
| 52 | #define U300_DMA_GENERAL_PURPOSE_8 37 | ||
| 53 | #define U300_DMA_UART1_TX 38 | ||
| 54 | #define U300_DMA_UART1_RX 39 | ||
| 55 | |||
| 56 | #define U300_DMA_DEVICE_CHANNELS 32 | ||
| 57 | #define U300_DMA_CHANNELS 40 | ||
| 58 | |||
| 59 | |||
| 60 | #endif /* DMA_CHANNELS_H */ | ||
diff --git a/arch/arm/mach-u300/dummyspichip.c b/arch/arm/mach-u300/dummyspichip.c index 2785cb67b5e..03f79361259 100644 --- a/arch/arm/mach-u300/dummyspichip.c +++ b/arch/arm/mach-u300/dummyspichip.c | |||
| @@ -222,7 +222,7 @@ static ssize_t dummy_looptest(struct device *dev, | |||
| 222 | 222 | ||
| 223 | static DEVICE_ATTR(looptest, S_IRUGO, dummy_looptest, NULL); | 223 | static DEVICE_ATTR(looptest, S_IRUGO, dummy_looptest, NULL); |
| 224 | 224 | ||
| 225 | static int pl022_dummy_probe(struct spi_device *spi) | 225 | static int __devinit pl022_dummy_probe(struct spi_device *spi) |
| 226 | { | 226 | { |
| 227 | struct dummy *p_dummy; | 227 | struct dummy *p_dummy; |
| 228 | int status; | 228 | int status; |
| @@ -251,7 +251,7 @@ out_dev_create_looptest_failed: | |||
| 251 | return status; | 251 | return status; |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | static int pl022_dummy_remove(struct spi_device *spi) | 254 | static int __devexit pl022_dummy_remove(struct spi_device *spi) |
| 255 | { | 255 | { |
| 256 | struct dummy *p_dummy = dev_get_drvdata(&spi->dev); | 256 | struct dummy *p_dummy = dev_get_drvdata(&spi->dev); |
| 257 | 257 | ||
| @@ -269,7 +269,7 @@ static struct spi_driver pl022_dummy_driver = { | |||
| 269 | .owner = THIS_MODULE, | 269 | .owner = THIS_MODULE, |
| 270 | }, | 270 | }, |
| 271 | .probe = pl022_dummy_probe, | 271 | .probe = pl022_dummy_probe, |
| 272 | .remove = pl022_dummy_remove, | 272 | .remove = __devexit_p(pl022_dummy_remove), |
| 273 | }; | 273 | }; |
| 274 | 274 | ||
| 275 | static int __init pl022_init_dummy(void) | 275 | static int __init pl022_init_dummy(void) |
diff --git a/arch/arm/mach-u300/i2c.c b/arch/arm/mach-u300/i2c.c index 96800aa1316..f0394baa11f 100644 --- a/arch/arm/mach-u300/i2c.c +++ b/arch/arm/mach-u300/i2c.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/mach-u300/i2c.c | 2 | * arch/arm/mach-u300/i2c.c |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2009-2012 ST-Ericsson AB | 4 | * Copyright (C) 2009 ST-Ericsson AB |
| 5 | * License terms: GNU General Public License (GPL) version 2 | 5 | * License terms: GNU General Public License (GPL) version 2 |
| 6 | * | 6 | * |
| 7 | * Register board i2c devices | 7 | * Register board i2c devices |
| @@ -9,7 +9,7 @@ | |||
| 9 | */ | 9 | */ |
| 10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
| 11 | #include <linux/i2c.h> | 11 | #include <linux/i2c.h> |
| 12 | #include <linux/mfd/ab3100.h> | 12 | #include <linux/mfd/abx500.h> |
| 13 | #include <linux/regulator/machine.h> | 13 | #include <linux/regulator/machine.h> |
| 14 | #include <linux/amba/bus.h> | 14 | #include <linux/amba/bus.h> |
| 15 | #include <mach/irqs.h> | 15 | #include <mach/irqs.h> |
| @@ -60,6 +60,7 @@ static struct regulator_consumer_supply supply_ldo_c[] = { | |||
| 60 | */ | 60 | */ |
| 61 | static struct regulator_consumer_supply supply_ldo_d[] = { | 61 | static struct regulator_consumer_supply supply_ldo_d[] = { |
| 62 | { | 62 | { |
| 63 | .dev = NULL, | ||
| 63 | .supply = "vana15", /* Powers the SoC (CPU etc) */ | 64 | .supply = "vana15", /* Powers the SoC (CPU etc) */ |
| 64 | }, | 65 | }, |
| 65 | }; | 66 | }; |
| @@ -91,6 +92,7 @@ static struct regulator_consumer_supply supply_ldo_k[] = { | |||
| 91 | */ | 92 | */ |
| 92 | static struct regulator_consumer_supply supply_ldo_ext[] = { | 93 | static struct regulator_consumer_supply supply_ldo_ext[] = { |
| 93 | { | 94 | { |
| 95 | .dev = NULL, | ||
| 94 | .supply = "vext", /* External power */ | 96 | .supply = "vext", /* External power */ |
| 95 | }, | 97 | }, |
| 96 | }; | 98 | }; |
| @@ -146,6 +148,9 @@ static struct ab3100_platform_data ab3100_plf_data = { | |||
| 146 | .min_uV = 1800000, | 148 | .min_uV = 1800000, |
| 147 | .max_uV = 1800000, | 149 | .max_uV = 1800000, |
| 148 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 150 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
| 151 | .valid_ops_mask = | ||
| 152 | REGULATOR_CHANGE_VOLTAGE | | ||
| 153 | REGULATOR_CHANGE_STATUS, | ||
| 149 | .always_on = 1, | 154 | .always_on = 1, |
| 150 | .boot_on = 1, | 155 | .boot_on = 1, |
| 151 | }, | 156 | }, |
| @@ -157,6 +162,9 @@ static struct ab3100_platform_data ab3100_plf_data = { | |||
| 157 | .min_uV = 2500000, | 162 | .min_uV = 2500000, |
| 158 | .max_uV = 2500000, | 163 | .max_uV = 2500000, |
| 159 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 164 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
| 165 | .valid_ops_mask = | ||
| 166 | REGULATOR_CHANGE_VOLTAGE | | ||
| 167 | REGULATOR_CHANGE_STATUS, | ||
| 160 | .always_on = 1, | 168 | .always_on = 1, |
| 161 | .boot_on = 1, | 169 | .boot_on = 1, |
| 162 | }, | 170 | }, |
| @@ -224,7 +232,8 @@ static struct ab3100_platform_data ab3100_plf_data = { | |||
| 224 | .max_uV = 1800000, | 232 | .max_uV = 1800000, |
| 225 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 233 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
| 226 | .valid_ops_mask = | 234 | .valid_ops_mask = |
| 227 | REGULATOR_CHANGE_VOLTAGE, | 235 | REGULATOR_CHANGE_VOLTAGE | |
| 236 | REGULATOR_CHANGE_STATUS, | ||
| 228 | .always_on = 1, | 237 | .always_on = 1, |
| 229 | .boot_on = 1, | 238 | .boot_on = 1, |
| 230 | }, | 239 | }, |
| @@ -247,8 +256,57 @@ static struct ab3100_platform_data ab3100_plf_data = { | |||
| 247 | }; | 256 | }; |
| 248 | #endif | 257 | #endif |
| 249 | 258 | ||
| 259 | #ifdef CONFIG_AB3550_CORE | ||
| 260 | static struct abx500_init_settings ab3550_init_settings[] = { | ||
| 261 | { | ||
| 262 | .bank = 0, | ||
| 263 | .reg = AB3550_IMR1, | ||
| 264 | .setting = 0xff | ||
| 265 | }, | ||
| 266 | { | ||
| 267 | .bank = 0, | ||
| 268 | .reg = AB3550_IMR2, | ||
| 269 | .setting = 0xff | ||
| 270 | }, | ||
| 271 | { | ||
| 272 | .bank = 0, | ||
| 273 | .reg = AB3550_IMR3, | ||
| 274 | .setting = 0xff | ||
| 275 | }, | ||
| 276 | { | ||
| 277 | .bank = 0, | ||
| 278 | .reg = AB3550_IMR4, | ||
| 279 | .setting = 0xff | ||
| 280 | }, | ||
| 281 | { | ||
| 282 | .bank = 0, | ||
| 283 | .reg = AB3550_IMR5, | ||
| 284 | /* The two most significant bits are not used */ | ||
| 285 | .setting = 0x3f | ||
| 286 | }, | ||
| 287 | }; | ||
| 288 | |||
| 289 | static struct ab3550_platform_data ab3550_plf_data = { | ||
| 290 | .irq = { | ||
| 291 | .base = IRQ_AB3550_BASE, | ||
| 292 | .count = (IRQ_AB3550_END - IRQ_AB3550_BASE + 1), | ||
| 293 | }, | ||
| 294 | .dev_data = { | ||
| 295 | }, | ||
| 296 | .init_settings = ab3550_init_settings, | ||
| 297 | .init_settings_sz = ARRAY_SIZE(ab3550_init_settings), | ||
| 298 | }; | ||
| 299 | #endif | ||
| 300 | |||
| 250 | static struct i2c_board_info __initdata bus0_i2c_board_info[] = { | 301 | static struct i2c_board_info __initdata bus0_i2c_board_info[] = { |
| 251 | #ifdef CONFIG_AB3100_CORE | 302 | #if defined(CONFIG_AB3550_CORE) |
| 303 | { | ||
| 304 | .type = "ab3550", | ||
| 305 | .addr = 0x4A, | ||
| 306 | .irq = IRQ_U300_IRQ0_EXT, | ||
| 307 | .platform_data = &ab3550_plf_data, | ||
| 308 | }, | ||
| 309 | #elif defined(CONFIG_AB3100_CORE) | ||
| 252 | { | 310 | { |
| 253 | .type = "ab3100", | 311 | .type = "ab3100", |
| 254 | .addr = 0x48, | 312 | .addr = 0x48, |
| @@ -261,6 +319,7 @@ static struct i2c_board_info __initdata bus0_i2c_board_info[] = { | |||
| 261 | }; | 319 | }; |
| 262 | 320 | ||
| 263 | static struct i2c_board_info __initdata bus1_i2c_board_info[] = { | 321 | static struct i2c_board_info __initdata bus1_i2c_board_info[] = { |
| 322 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 264 | { | 323 | { |
| 265 | .type = "fwcam", | 324 | .type = "fwcam", |
| 266 | .addr = 0x10, | 325 | .addr = 0x10, |
| @@ -269,6 +328,9 @@ static struct i2c_board_info __initdata bus1_i2c_board_info[] = { | |||
| 269 | .type = "fwcam", | 328 | .type = "fwcam", |
| 270 | .addr = 0x5d, | 329 | .addr = 0x5d, |
| 271 | }, | 330 | }, |
| 331 | #else | ||
| 332 | { }, | ||
| 333 | #endif | ||
| 272 | }; | 334 | }; |
| 273 | 335 | ||
| 274 | void __init u300_i2c_register_board_devices(void) | 336 | void __init u300_i2c_register_board_devices(void) |
diff --git a/arch/arm/mach-u300/include/mach/debug-macro.S b/arch/arm/mach-u300/include/mach/debug-macro.S index 8ae8e4ab34b..df715707bea 100644 --- a/arch/arm/mach-u300/include/mach/debug-macro.S +++ b/arch/arm/mach-u300/include/mach/debug-macro.S | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | */ | 10 | */ |
| 11 | #include <mach/hardware.h> | 11 | #include <mach/hardware.h> |
| 12 | 12 | ||
| 13 | .macro addruart, rp, rv, tmp | 13 | .macro addruart, rp, rv |
| 14 | /* If we move the address using MMU, use this. */ | 14 | /* If we move the address using MMU, use this. */ |
| 15 | ldr \rp, = U300_SLOW_PER_PHYS_BASE @ MMU off, physical address | 15 | ldr \rp, = U300_SLOW_PER_PHYS_BASE @ MMU off, physical address |
| 16 | ldr \rv, = U300_SLOW_PER_VIRT_BASE @ MMU on, virtual address | 16 | ldr \rv, = U300_SLOW_PER_VIRT_BASE @ MMU on, virtual address |
diff --git a/arch/arm/mach-u300/include/mach/irqs.h b/arch/arm/mach-u300/include/mach/irqs.h index 21d5e76a6cd..09b1b28fa8f 100644 --- a/arch/arm/mach-u300/include/mach/irqs.h +++ b/arch/arm/mach-u300/include/mach/irqs.h | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * arch/arm/mach-u300/include/mach/irqs.h | 3 | * arch/arm/mach-u300/include/mach/irqs.h |
| 4 | * | 4 | * |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2006-2012 ST-Ericsson AB | 6 | * Copyright (C) 2006-2009 ST-Ericsson AB |
| 7 | * License terms: GNU General Public License (GPL) version 2 | 7 | * License terms: GNU General Public License (GPL) version 2 |
| 8 | * IRQ channel definitions for the U300 platforms. | 8 | * IRQ channel definitions for the U300 platforms. |
| 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
| @@ -12,69 +12,110 @@ | |||
| 12 | #ifndef __MACH_IRQS_H | 12 | #ifndef __MACH_IRQS_H |
| 13 | #define __MACH_IRQS_H | 13 | #define __MACH_IRQS_H |
| 14 | 14 | ||
| 15 | #define IRQ_U300_INTCON0_START 32 | 15 | #define IRQ_U300_INTCON0_START 0 |
| 16 | #define IRQ_U300_INTCON1_START 64 | 16 | #define IRQ_U300_INTCON1_START 32 |
| 17 | /* These are on INTCON0 - 30 lines */ | 17 | /* These are on INTCON0 - 30 lines */ |
| 18 | #define IRQ_U300_IRQ0_EXT 32 | 18 | #define IRQ_U300_IRQ0_EXT 0 |
| 19 | #define IRQ_U300_IRQ1_EXT 33 | 19 | #define IRQ_U300_IRQ1_EXT 1 |
| 20 | #define IRQ_U300_DMA 34 | 20 | #define IRQ_U300_DMA 2 |
| 21 | #define IRQ_U300_VIDEO_ENC_0 35 | 21 | #define IRQ_U300_VIDEO_ENC_0 3 |
| 22 | #define IRQ_U300_VIDEO_ENC_1 36 | 22 | #define IRQ_U300_VIDEO_ENC_1 4 |
| 23 | #define IRQ_U300_AAIF_RX 37 | 23 | #define IRQ_U300_AAIF_RX 5 |
| 24 | #define IRQ_U300_AAIF_TX 38 | 24 | #define IRQ_U300_AAIF_TX 6 |
| 25 | #define IRQ_U300_AAIF_VGPIO 39 | 25 | #define IRQ_U300_AAIF_VGPIO 7 |
| 26 | #define IRQ_U300_AAIF_WAKEUP 40 | 26 | #define IRQ_U300_AAIF_WAKEUP 8 |
| 27 | #define IRQ_U300_PCM_I2S0_FRAME 41 | 27 | #define IRQ_U300_PCM_I2S0_FRAME 9 |
| 28 | #define IRQ_U300_PCM_I2S0_FIFO 42 | 28 | #define IRQ_U300_PCM_I2S0_FIFO 10 |
| 29 | #define IRQ_U300_PCM_I2S1_FRAME 43 | 29 | #define IRQ_U300_PCM_I2S1_FRAME 11 |
| 30 | #define IRQ_U300_PCM_I2S1_FIFO 44 | 30 | #define IRQ_U300_PCM_I2S1_FIFO 12 |
| 31 | #define IRQ_U300_XGAM_GAMCON 45 | 31 | #define IRQ_U300_XGAM_GAMCON 13 |
| 32 | #define IRQ_U300_XGAM_CDI 46 | 32 | #define IRQ_U300_XGAM_CDI 14 |
| 33 | #define IRQ_U300_XGAM_CDICON 47 | 33 | #define IRQ_U300_XGAM_CDICON 15 |
| 34 | #define IRQ_U300_XGAM_PDI 49 | 34 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) |
| 35 | #define IRQ_U300_XGAM_PDICON 50 | 35 | /* MMIACC not used on the DB3210 or DB3350 chips */ |
| 36 | #define IRQ_U300_XGAM_GAMEACC 51 | 36 | #define IRQ_U300_XGAM_MMIACC 16 |
| 37 | #define IRQ_U300_XGAM_MCIDCT 52 | 37 | #endif |
| 38 | #define IRQ_U300_APEX 53 | 38 | #define IRQ_U300_XGAM_PDI 17 |
| 39 | #define IRQ_U300_UART0 54 | 39 | #define IRQ_U300_XGAM_PDICON 18 |
| 40 | #define IRQ_U300_SPI 55 | 40 | #define IRQ_U300_XGAM_GAMEACC 19 |
| 41 | #define IRQ_U300_TIMER_APP_OS 56 | 41 | #define IRQ_U300_XGAM_MCIDCT 20 |
| 42 | #define IRQ_U300_TIMER_APP_DD 57 | 42 | #define IRQ_U300_APEX 21 |
| 43 | #define IRQ_U300_TIMER_APP_GP1 58 | 43 | #define IRQ_U300_UART0 22 |
| 44 | #define IRQ_U300_TIMER_APP_GP2 59 | 44 | #define IRQ_U300_SPI 23 |
| 45 | #define IRQ_U300_TIMER_OS 60 | 45 | #define IRQ_U300_TIMER_APP_OS 24 |
| 46 | #define IRQ_U300_TIMER_MS 61 | 46 | #define IRQ_U300_TIMER_APP_DD 25 |
| 47 | #define IRQ_U300_KEYPAD_KEYBF 62 | 47 | #define IRQ_U300_TIMER_APP_GP1 26 |
| 48 | #define IRQ_U300_KEYPAD_KEYBR 63 | 48 | #define IRQ_U300_TIMER_APP_GP2 27 |
| 49 | #define IRQ_U300_TIMER_OS 28 | ||
| 50 | #define IRQ_U300_TIMER_MS 29 | ||
| 51 | #define IRQ_U300_KEYPAD_KEYBF 30 | ||
| 52 | #define IRQ_U300_KEYPAD_KEYBR 31 | ||
| 49 | /* These are on INTCON1 - 32 lines */ | 53 | /* These are on INTCON1 - 32 lines */ |
| 50 | #define IRQ_U300_GPIO_PORT0 64 | 54 | #define IRQ_U300_GPIO_PORT0 32 |
| 51 | #define IRQ_U300_GPIO_PORT1 65 | 55 | #define IRQ_U300_GPIO_PORT1 33 |
| 52 | #define IRQ_U300_GPIO_PORT2 66 | 56 | #define IRQ_U300_GPIO_PORT2 34 |
| 53 | 57 | ||
| 58 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) || \ | ||
| 59 | defined(CONFIG_MACH_U300_BS335) | ||
| 54 | /* These are for DB3150, DB3200 and DB3350 */ | 60 | /* These are for DB3150, DB3200 and DB3350 */ |
| 55 | #define IRQ_U300_WDOG 67 | 61 | #define IRQ_U300_WDOG 35 |
| 56 | #define IRQ_U300_EVHIST 68 | 62 | #define IRQ_U300_EVHIST 36 |
| 57 | #define IRQ_U300_MSPRO 69 | 63 | #define IRQ_U300_MSPRO 37 |
| 58 | #define IRQ_U300_MMCSD_MCIINTR0 70 | 64 | #define IRQ_U300_MMCSD_MCIINTR0 38 |
| 59 | #define IRQ_U300_MMCSD_MCIINTR1 71 | 65 | #define IRQ_U300_MMCSD_MCIINTR1 39 |
| 60 | #define IRQ_U300_I2C0 72 | 66 | #define IRQ_U300_I2C0 40 |
| 61 | #define IRQ_U300_I2C1 73 | 67 | #define IRQ_U300_I2C1 41 |
| 62 | #define IRQ_U300_RTC 74 | 68 | #define IRQ_U300_RTC 42 |
| 63 | #define IRQ_U300_NFIF 75 | 69 | #define IRQ_U300_NFIF 43 |
| 64 | #define IRQ_U300_NFIF2 76 | 70 | #define IRQ_U300_NFIF2 44 |
| 71 | #endif | ||
| 72 | |||
| 73 | /* DB3150 and DB3200 have only 45 IRQs */ | ||
| 74 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) | ||
| 75 | #define U300_NR_IRQS 45 | ||
| 76 | #endif | ||
| 65 | 77 | ||
| 66 | /* The DB3350-specific interrupt lines */ | 78 | /* The DB3350-specific interrupt lines */ |
| 67 | #define IRQ_U300_ISP_F0 77 | 79 | #ifdef CONFIG_MACH_U300_BS335 |
| 68 | #define IRQ_U300_ISP_F1 78 | 80 | #define IRQ_U300_ISP_F0 45 |
| 69 | #define IRQ_U300_ISP_F2 79 | 81 | #define IRQ_U300_ISP_F1 46 |
| 70 | #define IRQ_U300_ISP_F3 80 | 82 | #define IRQ_U300_ISP_F2 47 |
| 71 | #define IRQ_U300_ISP_F4 81 | 83 | #define IRQ_U300_ISP_F3 48 |
| 72 | #define IRQ_U300_GPIO_PORT3 82 | 84 | #define IRQ_U300_ISP_F4 49 |
| 73 | #define IRQ_U300_SYSCON_PLL_LOCK 83 | 85 | #define IRQ_U300_GPIO_PORT3 50 |
| 74 | #define IRQ_U300_UART1 84 | 86 | #define IRQ_U300_SYSCON_PLL_LOCK 51 |
| 75 | #define IRQ_U300_GPIO_PORT4 85 | 87 | #define IRQ_U300_UART1 52 |
| 76 | #define IRQ_U300_GPIO_PORT5 86 | 88 | #define IRQ_U300_GPIO_PORT4 53 |
| 77 | #define IRQ_U300_GPIO_PORT6 87 | 89 | #define IRQ_U300_GPIO_PORT5 54 |
| 78 | #define U300_VIC_IRQS_END 88 | 90 | #define IRQ_U300_GPIO_PORT6 55 |
| 91 | #define U300_NR_IRQS 56 | ||
| 92 | #endif | ||
| 93 | |||
| 94 | /* The DB3210-specific interrupt lines */ | ||
| 95 | #ifdef CONFIG_MACH_U300_BS365 | ||
| 96 | #define IRQ_U300_GPIO_PORT3 35 | ||
| 97 | #define IRQ_U300_GPIO_PORT4 36 | ||
| 98 | #define IRQ_U300_WDOG 37 | ||
| 99 | #define IRQ_U300_EVHIST 38 | ||
| 100 | #define IRQ_U300_MSPRO 39 | ||
| 101 | #define IRQ_U300_MMCSD_MCIINTR0 40 | ||
| 102 | #define IRQ_U300_MMCSD_MCIINTR1 41 | ||
| 103 | #define IRQ_U300_I2C0 42 | ||
| 104 | #define IRQ_U300_I2C1 43 | ||
| 105 | #define IRQ_U300_RTC 44 | ||
| 106 | #define IRQ_U300_NFIF 45 | ||
| 107 | #define IRQ_U300_NFIF2 46 | ||
| 108 | #define IRQ_U300_SYSCON_PLL_LOCK 47 | ||
| 109 | #define U300_NR_IRQS 48 | ||
| 110 | #endif | ||
| 111 | |||
| 112 | #ifdef CONFIG_AB3550_CORE | ||
| 113 | #define IRQ_AB3550_BASE (U300_NR_IRQS) | ||
| 114 | #define IRQ_AB3550_END (IRQ_AB3550_BASE + 37) | ||
| 115 | |||
| 116 | #define NR_IRQS (IRQ_AB3550_END + 1) | ||
| 117 | #else | ||
| 118 | #define NR_IRQS U300_NR_IRQS | ||
| 119 | #endif | ||
| 79 | 120 | ||
| 80 | #endif | 121 | #endif |
diff --git a/arch/arm/mach-u300/include/mach/syscon.h b/arch/arm/mach-u300/include/mach/syscon.h index 10bdd0be977..7444f5c7da9 100644 --- a/arch/arm/mach-u300/include/mach/syscon.h +++ b/arch/arm/mach-u300/include/mach/syscon.h | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * arch/arm/mach-u300/include/mach/syscon.h | 3 | * arch/arm/mach-u300/include/mach/syscon.h |
| 4 | * | 4 | * |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2008-2012 ST-Ericsson AB | 6 | * Copyright (C) 2008 ST-Ericsson AB |
| 7 | * | 7 | * |
| 8 | * Author: Rickard Andersson <rickard.andersson@stericsson.com> | 8 | * Author: Rickard Andersson <rickard.andersson@stericsson.com> |
| 9 | */ | 9 | */ |
| @@ -36,7 +36,9 @@ | |||
| 36 | #define U300_SYSCON_CSR_PLL13_LOCK_IND (0x0001) | 36 | #define U300_SYSCON_CSR_PLL13_LOCK_IND (0x0001) |
| 37 | /* Reset lines for SLOW devices 16bit (R/W) */ | 37 | /* Reset lines for SLOW devices 16bit (R/W) */ |
| 38 | #define U300_SYSCON_RSR (0x0014) | 38 | #define U300_SYSCON_RSR (0x0014) |
| 39 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 39 | #define U300_SYSCON_RSR_PPM_RESET_EN (0x0200) | 40 | #define U300_SYSCON_RSR_PPM_RESET_EN (0x0200) |
| 41 | #endif | ||
| 40 | #define U300_SYSCON_RSR_ACC_TMR_RESET_EN (0x0100) | 42 | #define U300_SYSCON_RSR_ACC_TMR_RESET_EN (0x0100) |
| 41 | #define U300_SYSCON_RSR_APP_TMR_RESET_EN (0x0080) | 43 | #define U300_SYSCON_RSR_APP_TMR_RESET_EN (0x0080) |
| 42 | #define U300_SYSCON_RSR_RTC_RESET_EN (0x0040) | 44 | #define U300_SYSCON_RSR_RTC_RESET_EN (0x0040) |
| @@ -48,7 +50,9 @@ | |||
| 48 | #define U300_SYSCON_RSR_SLOW_BRIDGE_RESET_EN (0x0001) | 50 | #define U300_SYSCON_RSR_SLOW_BRIDGE_RESET_EN (0x0001) |
| 49 | /* Reset lines for FAST devices 16bit (R/W) */ | 51 | /* Reset lines for FAST devices 16bit (R/W) */ |
| 50 | #define U300_SYSCON_RFR (0x0018) | 52 | #define U300_SYSCON_RFR (0x0018) |
| 53 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 51 | #define U300_SYSCON_RFR_UART1_RESET_ENABLE (0x0080) | 54 | #define U300_SYSCON_RFR_UART1_RESET_ENABLE (0x0080) |
| 55 | #endif | ||
| 52 | #define U300_SYSCON_RFR_SPI_RESET_ENABLE (0x0040) | 56 | #define U300_SYSCON_RFR_SPI_RESET_ENABLE (0x0040) |
| 53 | #define U300_SYSCON_RFR_MMC_RESET_ENABLE (0x0020) | 57 | #define U300_SYSCON_RFR_MMC_RESET_ENABLE (0x0020) |
| 54 | #define U300_SYSCON_RFR_PCM_I2S1_RESET_ENABLE (0x0010) | 58 | #define U300_SYSCON_RFR_PCM_I2S1_RESET_ENABLE (0x0010) |
| @@ -58,8 +62,10 @@ | |||
| 58 | #define U300_SYSCON_RFR_FAST_BRIDGE_RESET_ENABLE (0x0001) | 62 | #define U300_SYSCON_RFR_FAST_BRIDGE_RESET_ENABLE (0x0001) |
| 59 | /* Reset lines for the rest of the peripherals 16bit (R/W) */ | 63 | /* Reset lines for the rest of the peripherals 16bit (R/W) */ |
| 60 | #define U300_SYSCON_RRR (0x001c) | 64 | #define U300_SYSCON_RRR (0x001c) |
| 65 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 61 | #define U300_SYSCON_RRR_CDS_RESET_EN (0x4000) | 66 | #define U300_SYSCON_RRR_CDS_RESET_EN (0x4000) |
| 62 | #define U300_SYSCON_RRR_ISP_RESET_EN (0x2000) | 67 | #define U300_SYSCON_RRR_ISP_RESET_EN (0x2000) |
| 68 | #endif | ||
| 63 | #define U300_SYSCON_RRR_INTCON_RESET_EN (0x1000) | 69 | #define U300_SYSCON_RRR_INTCON_RESET_EN (0x1000) |
| 64 | #define U300_SYSCON_RRR_MSPRO_RESET_EN (0x0800) | 70 | #define U300_SYSCON_RRR_MSPRO_RESET_EN (0x0800) |
| 65 | #define U300_SYSCON_RRR_XGAM_RESET_EN (0x0100) | 71 | #define U300_SYSCON_RRR_XGAM_RESET_EN (0x0100) |
| @@ -73,7 +79,9 @@ | |||
| 73 | #define U300_SYSCON_RRR_AAIF_RESET_EN (0x0001) | 79 | #define U300_SYSCON_RRR_AAIF_RESET_EN (0x0001) |
| 74 | /* Clock enable for SLOW peripherals 16bit (R/W) */ | 80 | /* Clock enable for SLOW peripherals 16bit (R/W) */ |
| 75 | #define U300_SYSCON_CESR (0x0020) | 81 | #define U300_SYSCON_CESR (0x0020) |
| 82 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 76 | #define U300_SYSCON_CESR_PPM_CLK_EN (0x0200) | 83 | #define U300_SYSCON_CESR_PPM_CLK_EN (0x0200) |
| 84 | #endif | ||
| 77 | #define U300_SYSCON_CESR_ACC_TMR_CLK_EN (0x0100) | 85 | #define U300_SYSCON_CESR_ACC_TMR_CLK_EN (0x0100) |
| 78 | #define U300_SYSCON_CESR_APP_TMR_CLK_EN (0x0080) | 86 | #define U300_SYSCON_CESR_APP_TMR_CLK_EN (0x0080) |
| 79 | #define U300_SYSCON_CESR_KEYPAD_CLK_EN (0x0040) | 87 | #define U300_SYSCON_CESR_KEYPAD_CLK_EN (0x0040) |
| @@ -84,20 +92,24 @@ | |||
| 84 | #define U300_SYSCON_CESR_SLOW_BRIDGE_CLK_EN (0x0001) | 92 | #define U300_SYSCON_CESR_SLOW_BRIDGE_CLK_EN (0x0001) |
| 85 | /* Clock enable for FAST peripherals 16bit (R/W) */ | 93 | /* Clock enable for FAST peripherals 16bit (R/W) */ |
| 86 | #define U300_SYSCON_CEFR (0x0024) | 94 | #define U300_SYSCON_CEFR (0x0024) |
| 95 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 87 | #define U300_SYSCON_CEFR_UART1_CLK_EN (0x0200) | 96 | #define U300_SYSCON_CEFR_UART1_CLK_EN (0x0200) |
| 97 | #endif | ||
| 88 | #define U300_SYSCON_CEFR_I2S1_CORE_CLK_EN (0x0100) | 98 | #define U300_SYSCON_CEFR_I2S1_CORE_CLK_EN (0x0100) |
| 89 | #define U300_SYSCON_CEFR_I2S0_CORE_CLK_EN (0x0080) | 99 | #define U300_SYSCON_CEFR_I2S0_CORE_CLK_EN (0x0080) |
| 90 | #define U300_SYSCON_CEFR_SPI_CLK_EN (0x0040) | 100 | #define U300_SYSCON_CEFR_SPI_CLK_EN (0x0040) |
| 91 | #define U300_SYSCON_CEFR_MMC_CLK_EN (0x0020) | 101 | #define U300_SYSCON_CEFR_MMC_CLK_EN (0x0020) |
| 92 | #define U300_SYSCON_CEFR_I2S1_CLK_EN (0x0010) | 102 | #define U300_SYSCON_CEFR_I2S1_CLK_EN (0x0010) |
| 93 | #define U300_SYSCON_CEFR_I2S0_CLK_EN (0x0008) | 103 | #define U300_SYSCON_CEFR_I2S0_CLK_EN (0x0008) |
| 94 | #define U300_SYSCON_CEFR_I2C1_CLK_EN (0x0004) | 104 | #define U300_SYSCON_CEFR_I2C1_CLK_EN (0x0004) |
| 95 | #define U300_SYSCON_CEFR_I2C0_CLK_EN (0x0002) | 105 | #define U300_SYSCON_CEFR_I2C0_CLK_EN (0x0002) |
| 96 | #define U300_SYSCON_CEFR_FAST_BRIDGE_CLK_EN (0x0001) | 106 | #define U300_SYSCON_CEFR_FAST_BRIDGE_CLK_EN (0x0001) |
| 97 | /* Clock enable for the rest of the peripherals 16bit (R/W) */ | 107 | /* Clock enable for the rest of the peripherals 16bit (R/W) */ |
| 98 | #define U300_SYSCON_CERR (0x0028) | 108 | #define U300_SYSCON_CERR (0x0028) |
| 109 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 99 | #define U300_SYSCON_CERR_CDS_CLK_EN (0x2000) | 110 | #define U300_SYSCON_CERR_CDS_CLK_EN (0x2000) |
| 100 | #define U300_SYSCON_CERR_ISP_CLK_EN (0x1000) | 111 | #define U300_SYSCON_CERR_ISP_CLK_EN (0x1000) |
| 112 | #endif | ||
| 101 | #define U300_SYSCON_CERR_MSPRO_CLK_EN (0x0800) | 113 | #define U300_SYSCON_CERR_MSPRO_CLK_EN (0x0800) |
| 102 | #define U300_SYSCON_CERR_AHB_SUBSYS_BRIDGE_CLK_EN (0x0400) | 114 | #define U300_SYSCON_CERR_AHB_SUBSYS_BRIDGE_CLK_EN (0x0400) |
| 103 | #define U300_SYSCON_CERR_SEMI_CLK_EN (0x0200) | 115 | #define U300_SYSCON_CERR_SEMI_CLK_EN (0x0200) |
| @@ -112,7 +124,9 @@ | |||
| 112 | #define U300_SYSCON_CERR_AAIF_CLK_EN (0x0001) | 124 | #define U300_SYSCON_CERR_AAIF_CLK_EN (0x0001) |
| 113 | /* Single block clock enable 16bit (-/W) */ | 125 | /* Single block clock enable 16bit (-/W) */ |
| 114 | #define U300_SYSCON_SBCER (0x002c) | 126 | #define U300_SYSCON_SBCER (0x002c) |
| 127 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 115 | #define U300_SYSCON_SBCER_PPM_CLK_EN (0x0009) | 128 | #define U300_SYSCON_SBCER_PPM_CLK_EN (0x0009) |
| 129 | #endif | ||
| 116 | #define U300_SYSCON_SBCER_ACC_TMR_CLK_EN (0x0008) | 130 | #define U300_SYSCON_SBCER_ACC_TMR_CLK_EN (0x0008) |
| 117 | #define U300_SYSCON_SBCER_APP_TMR_CLK_EN (0x0007) | 131 | #define U300_SYSCON_SBCER_APP_TMR_CLK_EN (0x0007) |
| 118 | #define U300_SYSCON_SBCER_KEYPAD_CLK_EN (0x0006) | 132 | #define U300_SYSCON_SBCER_KEYPAD_CLK_EN (0x0006) |
| @@ -121,7 +135,9 @@ | |||
| 121 | #define U300_SYSCON_SBCER_BTR_CLK_EN (0x0002) | 135 | #define U300_SYSCON_SBCER_BTR_CLK_EN (0x0002) |
| 122 | #define U300_SYSCON_SBCER_UART_CLK_EN (0x0001) | 136 | #define U300_SYSCON_SBCER_UART_CLK_EN (0x0001) |
| 123 | #define U300_SYSCON_SBCER_SLOW_BRIDGE_CLK_EN (0x0000) | 137 | #define U300_SYSCON_SBCER_SLOW_BRIDGE_CLK_EN (0x0000) |
| 138 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 124 | #define U300_SYSCON_SBCER_UART1_CLK_EN (0x0019) | 139 | #define U300_SYSCON_SBCER_UART1_CLK_EN (0x0019) |
| 140 | #endif | ||
| 125 | #define U300_SYSCON_SBCER_I2S1_CORE_CLK_EN (0x0018) | 141 | #define U300_SYSCON_SBCER_I2S1_CORE_CLK_EN (0x0018) |
| 126 | #define U300_SYSCON_SBCER_I2S0_CORE_CLK_EN (0x0017) | 142 | #define U300_SYSCON_SBCER_I2S0_CORE_CLK_EN (0x0017) |
| 127 | #define U300_SYSCON_SBCER_SPI_CLK_EN (0x0016) | 143 | #define U300_SYSCON_SBCER_SPI_CLK_EN (0x0016) |
| @@ -131,8 +147,10 @@ | |||
| 131 | #define U300_SYSCON_SBCER_I2C1_CLK_EN (0x0012) | 147 | #define U300_SYSCON_SBCER_I2C1_CLK_EN (0x0012) |
| 132 | #define U300_SYSCON_SBCER_I2C0_CLK_EN (0x0011) | 148 | #define U300_SYSCON_SBCER_I2C0_CLK_EN (0x0011) |
| 133 | #define U300_SYSCON_SBCER_FAST_BRIDGE_CLK_EN (0x0010) | 149 | #define U300_SYSCON_SBCER_FAST_BRIDGE_CLK_EN (0x0010) |
| 150 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 134 | #define U300_SYSCON_SBCER_CDS_CLK_EN (0x002D) | 151 | #define U300_SYSCON_SBCER_CDS_CLK_EN (0x002D) |
| 135 | #define U300_SYSCON_SBCER_ISP_CLK_EN (0x002C) | 152 | #define U300_SYSCON_SBCER_ISP_CLK_EN (0x002C) |
| 153 | #endif | ||
| 136 | #define U300_SYSCON_SBCER_MSPRO_CLK_EN (0x002B) | 154 | #define U300_SYSCON_SBCER_MSPRO_CLK_EN (0x002B) |
| 137 | #define U300_SYSCON_SBCER_AHB_SUBSYS_BRIDGE_CLK_EN (0x002A) | 155 | #define U300_SYSCON_SBCER_AHB_SUBSYS_BRIDGE_CLK_EN (0x002A) |
| 138 | #define U300_SYSCON_SBCER_SEMI_CLK_EN (0x0029) | 156 | #define U300_SYSCON_SBCER_SEMI_CLK_EN (0x0029) |
| @@ -150,7 +168,9 @@ | |||
| 150 | /* Same values as above for SBCER */ | 168 | /* Same values as above for SBCER */ |
| 151 | /* Clock force SLOW peripherals 16bit (R/W) */ | 169 | /* Clock force SLOW peripherals 16bit (R/W) */ |
| 152 | #define U300_SYSCON_CFSR (0x003c) | 170 | #define U300_SYSCON_CFSR (0x003c) |
| 171 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 153 | #define U300_SYSCON_CFSR_PPM_CLK_FORCE_EN (0x0200) | 172 | #define U300_SYSCON_CFSR_PPM_CLK_FORCE_EN (0x0200) |
| 173 | #endif | ||
| 154 | #define U300_SYSCON_CFSR_ACC_TMR_CLK_FORCE_EN (0x0100) | 174 | #define U300_SYSCON_CFSR_ACC_TMR_CLK_FORCE_EN (0x0100) |
| 155 | #define U300_SYSCON_CFSR_APP_TMR_CLK_FORCE_EN (0x0080) | 175 | #define U300_SYSCON_CFSR_APP_TMR_CLK_FORCE_EN (0x0080) |
| 156 | #define U300_SYSCON_CFSR_KEYPAD_CLK_FORCE_EN (0x0020) | 176 | #define U300_SYSCON_CFSR_KEYPAD_CLK_FORCE_EN (0x0020) |
| @@ -164,8 +184,10 @@ | |||
| 164 | /* Values not defined. Define if you want to use them. */ | 184 | /* Values not defined. Define if you want to use them. */ |
| 165 | /* Clock force the rest of the peripherals 16bit (R/W) */ | 185 | /* Clock force the rest of the peripherals 16bit (R/W) */ |
| 166 | #define U300_SYSCON_CFRR (0x44) | 186 | #define U300_SYSCON_CFRR (0x44) |
| 187 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 167 | #define U300_SYSCON_CFRR_CDS_CLK_FORCE_EN (0x2000) | 188 | #define U300_SYSCON_CFRR_CDS_CLK_FORCE_EN (0x2000) |
| 168 | #define U300_SYSCON_CFRR_ISP_CLK_FORCE_EN (0x1000) | 189 | #define U300_SYSCON_CFRR_ISP_CLK_FORCE_EN (0x1000) |
| 190 | #endif | ||
| 169 | #define U300_SYSCON_CFRR_MSPRO_CLK_FORCE_EN (0x0800) | 191 | #define U300_SYSCON_CFRR_MSPRO_CLK_FORCE_EN (0x0800) |
| 170 | #define U300_SYSCON_CFRR_AHB_SUBSYS_BRIDGE_CLK_FORCE_EN (0x0400) | 192 | #define U300_SYSCON_CFRR_AHB_SUBSYS_BRIDGE_CLK_FORCE_EN (0x0400) |
| 171 | #define U300_SYSCON_CFRR_SEMI_CLK_FORCE_EN (0x0200) | 193 | #define U300_SYSCON_CFRR_SEMI_CLK_FORCE_EN (0x0200) |
| @@ -212,6 +234,91 @@ | |||
| 212 | #define U300_SYSCON_ECCR_EMIF_1_RET_OUT_CLK_EN_N_DISABLE (0x0004) | 234 | #define U300_SYSCON_ECCR_EMIF_1_RET_OUT_CLK_EN_N_DISABLE (0x0004) |
| 213 | #define U300_SYSCON_ECCR_EMIF_MEMCLK_RET_EN_N_DISABLE (0x0002) | 235 | #define U300_SYSCON_ECCR_EMIF_MEMCLK_RET_EN_N_DISABLE (0x0002) |
| 214 | #define U300_SYSCON_ECCR_EMIF_SDRCLK_RET_EN_N_DISABLE (0x0001) | 236 | #define U300_SYSCON_ECCR_EMIF_SDRCLK_RET_EN_N_DISABLE (0x0001) |
| 237 | /* PAD MUX Control register 1 (LOW) 16bit (R/W) */ | ||
| 238 | #define U300_SYSCON_PMC1LR (0x007C) | ||
| 239 | #define U300_SYSCON_PMC1LR_MASK (0xFFFF) | ||
| 240 | #define U300_SYSCON_PMC1LR_CDI_MASK (0xC000) | ||
| 241 | #define U300_SYSCON_PMC1LR_CDI_CDI (0x0000) | ||
| 242 | #define U300_SYSCON_PMC1LR_CDI_EMIF (0x4000) | ||
| 243 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 244 | #define U300_SYSCON_PMC1LR_CDI_CDI2 (0x8000) | ||
| 245 | #define U300_SYSCON_PMC1LR_CDI_WCDMA_APP_GPIO (0xC000) | ||
| 246 | #elif CONFIG_MACH_U300_BS365 | ||
| 247 | #define U300_SYSCON_PMC1LR_CDI_GPIO (0x8000) | ||
| 248 | #define U300_SYSCON_PMC1LR_CDI_WCDMA (0xC000) | ||
| 249 | #endif | ||
| 250 | #define U300_SYSCON_PMC1LR_PDI_MASK (0x3000) | ||
| 251 | #define U300_SYSCON_PMC1LR_PDI_PDI (0x0000) | ||
| 252 | #define U300_SYSCON_PMC1LR_PDI_EGG (0x1000) | ||
| 253 | #define U300_SYSCON_PMC1LR_PDI_WCDMA (0x3000) | ||
| 254 | #define U300_SYSCON_PMC1LR_MMCSD_MASK (0x0C00) | ||
| 255 | #define U300_SYSCON_PMC1LR_MMCSD_MMCSD (0x0000) | ||
| 256 | #define U300_SYSCON_PMC1LR_MMCSD_MSPRO (0x0400) | ||
| 257 | #define U300_SYSCON_PMC1LR_MMCSD_DSP (0x0800) | ||
| 258 | #define U300_SYSCON_PMC1LR_MMCSD_WCDMA (0x0C00) | ||
| 259 | #define U300_SYSCON_PMC1LR_ETM_MASK (0x0300) | ||
| 260 | #define U300_SYSCON_PMC1LR_ETM_ACC (0x0000) | ||
| 261 | #define U300_SYSCON_PMC1LR_ETM_APP (0x0100) | ||
| 262 | #define U300_SYSCON_PMC1LR_EMIF_1_CS2_MASK (0x00C0) | ||
| 263 | #define U300_SYSCON_PMC1LR_EMIF_1_CS2_STATIC (0x0000) | ||
| 264 | #define U300_SYSCON_PMC1LR_EMIF_1_CS2_NFIF (0x0040) | ||
| 265 | #define U300_SYSCON_PMC1LR_EMIF_1_CS2_SDRAM (0x0080) | ||
| 266 | #define U300_SYSCON_PMC1LR_EMIF_1_CS2_STATIC_2GB (0x00C0) | ||
| 267 | #define U300_SYSCON_PMC1LR_EMIF_1_CS1_MASK (0x0030) | ||
| 268 | #define U300_SYSCON_PMC1LR_EMIF_1_CS1_STATIC (0x0000) | ||
| 269 | #define U300_SYSCON_PMC1LR_EMIF_1_CS1_NFIF (0x0010) | ||
| 270 | #define U300_SYSCON_PMC1LR_EMIF_1_CS1_SDRAM (0x0020) | ||
| 271 | #define U300_SYSCON_PMC1LR_EMIF_1_CS1_SEMI (0x0030) | ||
| 272 | #define U300_SYSCON_PMC1LR_EMIF_1_CS0_MASK (0x000C) | ||
| 273 | #define U300_SYSCON_PMC1LR_EMIF_1_CS0_STATIC (0x0000) | ||
| 274 | #define U300_SYSCON_PMC1LR_EMIF_1_CS0_NFIF (0x0004) | ||
| 275 | #define U300_SYSCON_PMC1LR_EMIF_1_CS0_SDRAM (0x0008) | ||
| 276 | #define U300_SYSCON_PMC1LR_EMIF_1_CS0_SEMI (0x000C) | ||
| 277 | #define U300_SYSCON_PMC1LR_EMIF_1_MASK (0x0003) | ||
| 278 | #define U300_SYSCON_PMC1LR_EMIF_1_STATIC (0x0000) | ||
| 279 | #define U300_SYSCON_PMC1LR_EMIF_1_SDRAM0 (0x0001) | ||
| 280 | #define U300_SYSCON_PMC1LR_EMIF_1_SDRAM1 (0x0002) | ||
| 281 | #define U300_SYSCON_PMC1LR_EMIF_1 (0x0003) | ||
| 282 | /* PAD MUX Control register 2 (HIGH) 16bit (R/W) */ | ||
| 283 | #define U300_SYSCON_PMC1HR (0x007E) | ||
| 284 | #define U300_SYSCON_PMC1HR_MASK (0xFFFF) | ||
| 285 | #define U300_SYSCON_PMC1HR_MISC_2_MASK (0xC000) | ||
| 286 | #define U300_SYSCON_PMC1HR_MISC_2_APP_GPIO (0x0000) | ||
| 287 | #define U300_SYSCON_PMC1HR_MISC_2_MSPRO (0x4000) | ||
| 288 | #define U300_SYSCON_PMC1HR_MISC_2_DSP (0x8000) | ||
| 289 | #define U300_SYSCON_PMC1HR_MISC_2_AAIF (0xC000) | ||
| 290 | #define U300_SYSCON_PMC1HR_APP_GPIO_2_MASK (0x3000) | ||
| 291 | #define U300_SYSCON_PMC1HR_APP_GPIO_2_APP_GPIO (0x0000) | ||
| 292 | #define U300_SYSCON_PMC1HR_APP_GPIO_2_NFIF (0x1000) | ||
| 293 | #define U300_SYSCON_PMC1HR_APP_GPIO_2_DSP (0x2000) | ||
| 294 | #define U300_SYSCON_PMC1HR_APP_GPIO_2_AAIF (0x3000) | ||
| 295 | #define U300_SYSCON_PMC1HR_APP_GPIO_1_MASK (0x0C00) | ||
| 296 | #define U300_SYSCON_PMC1HR_APP_GPIO_1_APP_GPIO (0x0000) | ||
| 297 | #define U300_SYSCON_PMC1HR_APP_GPIO_1_MMC (0x0400) | ||
| 298 | #define U300_SYSCON_PMC1HR_APP_GPIO_1_DSP (0x0800) | ||
| 299 | #define U300_SYSCON_PMC1HR_APP_GPIO_1_AAIF (0x0C00) | ||
| 300 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_2_MASK (0x0300) | ||
| 301 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_2_APP_GPIO (0x0000) | ||
| 302 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_2_SPI (0x0100) | ||
| 303 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_2_AAIF (0x0300) | ||
| 304 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_1_MASK (0x00C0) | ||
| 305 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_1_APP_GPIO (0x0000) | ||
| 306 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_1_SPI (0x0040) | ||
| 307 | #define U300_SYSCON_PMC1HR_APP_SPI_CS_1_AAIF (0x00C0) | ||
| 308 | #define U300_SYSCON_PMC1HR_APP_SPI_2_MASK (0x0030) | ||
| 309 | #define U300_SYSCON_PMC1HR_APP_SPI_2_APP_GPIO (0x0000) | ||
| 310 | #define U300_SYSCON_PMC1HR_APP_SPI_2_SPI (0x0010) | ||
| 311 | #define U300_SYSCON_PMC1HR_APP_SPI_2_DSP (0x0020) | ||
| 312 | #define U300_SYSCON_PMC1HR_APP_SPI_2_AAIF (0x0030) | ||
| 313 | #define U300_SYSCON_PMC1HR_APP_UART0_2_MASK (0x000C) | ||
| 314 | #define U300_SYSCON_PMC1HR_APP_UART0_2_APP_GPIO (0x0000) | ||
| 315 | #define U300_SYSCON_PMC1HR_APP_UART0_2_UART0 (0x0004) | ||
| 316 | #define U300_SYSCON_PMC1HR_APP_UART0_2_NFIF_CS (0x0008) | ||
| 317 | #define U300_SYSCON_PMC1HR_APP_UART0_2_AAIF (0x000C) | ||
| 318 | #define U300_SYSCON_PMC1HR_APP_UART0_1_MASK (0x0003) | ||
| 319 | #define U300_SYSCON_PMC1HR_APP_UART0_1_APP_GPIO (0x0000) | ||
| 320 | #define U300_SYSCON_PMC1HR_APP_UART0_1_UART0 (0x0001) | ||
| 321 | #define U300_SYSCON_PMC1HR_APP_UART0_1_AAIF (0x0003) | ||
| 215 | /* Step one for killing the applications system 16bit (-/W) */ | 322 | /* Step one for killing the applications system 16bit (-/W) */ |
| 216 | #define U300_SYSCON_KA1R (0x0080) | 323 | #define U300_SYSCON_KA1R (0x0080) |
| 217 | #define U300_SYSCON_KA1R_MASK (0xFFFF) | 324 | #define U300_SYSCON_KA1R_MASK (0xFFFF) |
| @@ -250,6 +357,57 @@ | |||
| 250 | #define U300_SYSCON_PUCR_EMIF_1_16BIT_PU_ENABLE (0x0080) | 357 | #define U300_SYSCON_PUCR_EMIF_1_16BIT_PU_ENABLE (0x0080) |
| 251 | #define U300_SYSCON_PUCR_EMIF_1_8BIT_PU_ENABLE (0x0040) | 358 | #define U300_SYSCON_PUCR_EMIF_1_8BIT_PU_ENABLE (0x0040) |
| 252 | #define U300_SYSCON_PUCR_KEY_IN_PU_EN_MASK (0x003F) | 359 | #define U300_SYSCON_PUCR_KEY_IN_PU_EN_MASK (0x003F) |
| 360 | /* Padmux 2 control */ | ||
| 361 | #define U300_SYSCON_PMC2R (0x100) | ||
| 362 | #define U300_SYSCON_PMC2R_APP_MISC_0_MASK (0x00C0) | ||
| 363 | #define U300_SYSCON_PMC2R_APP_MISC_0_APP_GPIO (0x0000) | ||
| 364 | #define U300_SYSCON_PMC2R_APP_MISC_0_EMIF_SDRAM (0x0040) | ||
| 365 | #define U300_SYSCON_PMC2R_APP_MISC_0_MMC (0x0080) | ||
| 366 | #define U300_SYSCON_PMC2R_APP_MISC_0_CDI2 (0x00C0) | ||
| 367 | #define U300_SYSCON_PMC2R_APP_MISC_1_MASK (0x0300) | ||
| 368 | #define U300_SYSCON_PMC2R_APP_MISC_1_APP_GPIO (0x0000) | ||
| 369 | #define U300_SYSCON_PMC2R_APP_MISC_1_EMIF_SDRAM (0x0100) | ||
| 370 | #define U300_SYSCON_PMC2R_APP_MISC_1_MMC (0x0200) | ||
| 371 | #define U300_SYSCON_PMC2R_APP_MISC_1_CDI2 (0x0300) | ||
| 372 | #define U300_SYSCON_PMC2R_APP_MISC_2_MASK (0x0C00) | ||
| 373 | #define U300_SYSCON_PMC2R_APP_MISC_2_APP_GPIO (0x0000) | ||
| 374 | #define U300_SYSCON_PMC2R_APP_MISC_2_EMIF_SDRAM (0x0400) | ||
| 375 | #define U300_SYSCON_PMC2R_APP_MISC_2_MMC (0x0800) | ||
| 376 | #define U300_SYSCON_PMC2R_APP_MISC_2_CDI2 (0x0C00) | ||
| 377 | #define U300_SYSCON_PMC2R_APP_MISC_3_MASK (0x3000) | ||
| 378 | #define U300_SYSCON_PMC2R_APP_MISC_3_APP_GPIO (0x0000) | ||
| 379 | #define U300_SYSCON_PMC2R_APP_MISC_3_EMIF_SDRAM (0x1000) | ||
| 380 | #define U300_SYSCON_PMC2R_APP_MISC_3_MMC (0x2000) | ||
| 381 | #define U300_SYSCON_PMC2R_APP_MISC_3_CDI2 (0x3000) | ||
| 382 | #define U300_SYSCON_PMC2R_APP_MISC_4_MASK (0xC000) | ||
| 383 | #define U300_SYSCON_PMC2R_APP_MISC_4_APP_GPIO (0x0000) | ||
| 384 | #define U300_SYSCON_PMC2R_APP_MISC_4_EMIF_SDRAM (0x4000) | ||
| 385 | #define U300_SYSCON_PMC2R_APP_MISC_4_MMC (0x8000) | ||
| 386 | #define U300_SYSCON_PMC2R_APP_MISC_4_ACC_GPIO (0xC000) | ||
| 387 | /* TODO: More SYSCON registers missing */ | ||
| 388 | #define U300_SYSCON_PMC3R (0x10c) | ||
| 389 | #define U300_SYSCON_PMC3R_APP_MISC_11_MASK (0xc000) | ||
| 390 | #define U300_SYSCON_PMC3R_APP_MISC_11_SPI (0x4000) | ||
| 391 | #define U300_SYSCON_PMC3R_APP_MISC_10_MASK (0x3000) | ||
| 392 | #define U300_SYSCON_PMC3R_APP_MISC_10_SPI (0x1000) | ||
| 393 | /* TODO: Missing other configs */ | ||
| 394 | #define U300_SYSCON_PMC4R (0x168) | ||
| 395 | #define U300_SYSCON_PMC4R_APP_MISC_12_MASK (0x0003) | ||
| 396 | #define U300_SYSCON_PMC4R_APP_MISC_12_APP_GPIO (0x0000) | ||
| 397 | #define U300_SYSCON_PMC4R_APP_MISC_13_MASK (0x000C) | ||
| 398 | #define U300_SYSCON_PMC4R_APP_MISC_13_CDI (0x0000) | ||
| 399 | #define U300_SYSCON_PMC4R_APP_MISC_13_SMIA (0x0004) | ||
| 400 | #define U300_SYSCON_PMC4R_APP_MISC_13_SMIA2 (0x0008) | ||
| 401 | #define U300_SYSCON_PMC4R_APP_MISC_13_APP_GPIO (0x000C) | ||
| 402 | #define U300_SYSCON_PMC4R_APP_MISC_14_MASK (0x0030) | ||
| 403 | #define U300_SYSCON_PMC4R_APP_MISC_14_CDI (0x0000) | ||
| 404 | #define U300_SYSCON_PMC4R_APP_MISC_14_SMIA (0x0010) | ||
| 405 | #define U300_SYSCON_PMC4R_APP_MISC_14_CDI2 (0x0020) | ||
| 406 | #define U300_SYSCON_PMC4R_APP_MISC_14_APP_GPIO (0x0030) | ||
| 407 | #define U300_SYSCON_PMC4R_APP_MISC_16_MASK (0x0300) | ||
| 408 | #define U300_SYSCON_PMC4R_APP_MISC_16_APP_GPIO_13 (0x0000) | ||
| 409 | #define U300_SYSCON_PMC4R_APP_MISC_16_APP_UART1_CTS (0x0100) | ||
| 410 | #define U300_SYSCON_PMC4R_APP_MISC_16_EMIF_1_STATIC_CS5_N (0x0200) | ||
| 253 | /* SYS_0_CLK_CONTROL first clock control 16bit (R/W) */ | 411 | /* SYS_0_CLK_CONTROL first clock control 16bit (R/W) */ |
| 254 | #define U300_SYSCON_S0CCR (0x120) | 412 | #define U300_SYSCON_S0CCR (0x120) |
| 255 | #define U300_SYSCON_S0CCR_FIELD_MASK (0x43FF) | 413 | #define U300_SYSCON_S0CCR_FIELD_MASK (0x43FF) |
diff --git a/arch/arm/mach-u300/include/mach/u300-regs.h b/arch/arm/mach-u300/include/mach/u300-regs.h index 1e49d901f2c..035fdc9dbdb 100644 --- a/arch/arm/mach-u300/include/mach/u300-regs.h +++ b/arch/arm/mach-u300/include/mach/u300-regs.h | |||
| @@ -18,16 +18,18 @@ | |||
| 18 | * the defines are used for setting up the I/O memory mapping. | 18 | * the defines are used for setting up the I/O memory mapping. |
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #ifdef __ASSEMBLER__ | ||
| 22 | #define IOMEM(a) (a) | ||
| 23 | #else | ||
| 24 | #define IOMEM(a) (void __iomem *) a | ||
| 25 | #endif | ||
| 26 | |||
| 21 | /* NAND Flash CS0 */ | 27 | /* NAND Flash CS0 */ |
| 22 | #define U300_NAND_CS0_PHYS_BASE 0x80000000 | 28 | #define U300_NAND_CS0_PHYS_BASE 0x80000000 |
| 23 | 29 | ||
| 24 | /* NFIF */ | 30 | /* NFIF */ |
| 25 | #define U300_NAND_IF_PHYS_BASE 0x9f800000 | 31 | #define U300_NAND_IF_PHYS_BASE 0x9f800000 |
| 26 | 32 | ||
| 27 | /* ALE, CLE offset for FSMC NAND */ | ||
| 28 | #define PLAT_NAND_CLE (1 << 16) | ||
| 29 | #define PLAT_NAND_ALE (1 << 17) | ||
| 30 | |||
| 31 | /* AHB Peripherals */ | 33 | /* AHB Peripherals */ |
| 32 | #define U300_AHB_PER_PHYS_BASE 0xa0000000 | 34 | #define U300_AHB_PER_PHYS_BASE 0xa0000000 |
| 33 | #define U300_AHB_PER_VIRT_BASE 0xff010000 | 35 | #define U300_AHB_PER_VIRT_BASE 0xff010000 |
| @@ -45,7 +47,11 @@ | |||
| 45 | #define U300_BOOTROM_VIRT_BASE 0xffff0000 | 47 | #define U300_BOOTROM_VIRT_BASE 0xffff0000 |
| 46 | 48 | ||
| 47 | /* SEMI config base */ | 49 | /* SEMI config base */ |
| 50 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 48 | #define U300_SEMI_CONFIG_BASE 0x2FFE0000 | 51 | #define U300_SEMI_CONFIG_BASE 0x2FFE0000 |
| 52 | #else | ||
| 53 | #define U300_SEMI_CONFIG_BASE 0x30000000 | ||
| 54 | #endif | ||
| 49 | 55 | ||
| 50 | /* | 56 | /* |
| 51 | * AHB peripherals | 57 | * AHB peripherals |
| @@ -94,8 +100,10 @@ | |||
| 94 | /* SPI controller */ | 100 | /* SPI controller */ |
| 95 | #define U300_SPI_BASE (U300_FAST_PER_PHYS_BASE+0x6000) | 101 | #define U300_SPI_BASE (U300_FAST_PER_PHYS_BASE+0x6000) |
| 96 | 102 | ||
| 103 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 97 | /* Fast UART1 on U335 only */ | 104 | /* Fast UART1 on U335 only */ |
| 98 | #define U300_UART1_BASE (U300_SLOW_PER_PHYS_BASE+0x7000) | 105 | #define U300_UART1_BASE (U300_SLOW_PER_PHYS_BASE+0x7000) |
| 106 | #endif | ||
| 99 | 107 | ||
| 100 | /* | 108 | /* |
| 101 | * SLOW peripherals | 109 | * SLOW peripherals |
| @@ -144,8 +152,10 @@ | |||
| 144 | * REST peripherals | 152 | * REST peripherals |
| 145 | */ | 153 | */ |
| 146 | 154 | ||
| 147 | /* ISP (image signal processor) */ | 155 | /* ISP (image signal processor) is only available in U335 */ |
| 156 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 148 | #define U300_ISP_BASE (0xA0008000) | 157 | #define U300_ISP_BASE (0xA0008000) |
| 158 | #endif | ||
| 149 | 159 | ||
| 150 | /* DMA Controller base */ | 160 | /* DMA Controller base */ |
| 151 | #define U300_DMAC_BASE (0xC0020000) | 161 | #define U300_DMAC_BASE (0xC0020000) |
| @@ -157,9 +167,17 @@ | |||
| 157 | #define U300_APEX_BASE (0xc0030000) | 167 | #define U300_APEX_BASE (0xc0030000) |
| 158 | 168 | ||
| 159 | /* Video Encoder Base */ | 169 | /* Video Encoder Base */ |
| 170 | #ifdef CONFIG_MACH_U300_BS335 | ||
| 160 | #define U300_VIDEOENC_BASE (0xc0080000) | 171 | #define U300_VIDEOENC_BASE (0xc0080000) |
| 172 | #else | ||
| 173 | #define U300_VIDEOENC_BASE (0xc0040000) | ||
| 174 | #endif | ||
| 161 | 175 | ||
| 162 | /* XGAM Base */ | 176 | /* XGAM Base */ |
| 163 | #define U300_XGAM_BASE (0xd0000000) | 177 | #define U300_XGAM_BASE (0xd0000000) |
| 164 | 178 | ||
| 179 | /* | ||
| 180 | * Virtual accessor macros for static devices | ||
| 181 | */ | ||
| 182 | |||
| 165 | #endif | 183 | #endif |
diff --git a/arch/arm/mach-u300/spi.c b/arch/arm/mach-u300/spi.c index 02e6659286d..7b597e2b19e 100644 --- a/arch/arm/mach-u300/spi.c +++ b/arch/arm/mach-u300/spi.c | |||
| @@ -12,7 +12,9 @@ | |||
| 12 | #include <linux/amba/pl022.h> | 12 | #include <linux/amba/pl022.h> |
| 13 | #include <linux/err.h> | 13 | #include <linux/err.h> |
| 14 | #include <mach/coh901318.h> | 14 | #include <mach/coh901318.h> |
| 15 | #include "dma_channels.h" | 15 | #include <mach/dma_channels.h> |
| 16 | |||
| 17 | #include "padmux.h" | ||
| 16 | 18 | ||
| 17 | /* | 19 | /* |
| 18 | * The following is for the actual devices on the SSP/SPI bus | 20 | * The following is for the actual devices on the SSP/SPI bus |
| @@ -93,7 +95,25 @@ static struct pl022_ssp_controller ssp_platform_data = { | |||
| 93 | 95 | ||
| 94 | void __init u300_spi_init(struct amba_device *adev) | 96 | void __init u300_spi_init(struct amba_device *adev) |
| 95 | { | 97 | { |
| 98 | struct pmx *pmx; | ||
| 99 | |||
| 96 | adev->dev.platform_data = &ssp_platform_data; | 100 | adev->dev.platform_data = &ssp_platform_data; |
| 101 | /* | ||
| 102 | * Setup padmuxing for SPI. Since this must always be | ||
| 103 | * compiled into the kernel, pmx is never released. | ||
| 104 | */ | ||
| 105 | pmx = pmx_get(&adev->dev, U300_APP_PMX_SPI_SETTING); | ||
| 106 | |||
| 107 | if (IS_ERR(pmx)) | ||
| 108 | dev_warn(&adev->dev, "Could not get padmux handle\n"); | ||
| 109 | else { | ||
| 110 | int ret; | ||
| 111 | |||
| 112 | ret = pmx_activate(&adev->dev, pmx); | ||
| 113 | if (IS_ERR_VALUE(ret)) | ||
| 114 | dev_warn(&adev->dev, "Could not activate padmuxing\n"); | ||
| 115 | } | ||
| 116 | |||
| 97 | } | 117 | } |
| 98 | 118 | ||
| 99 | void __init u300_spi_register_board_devices(void) | 119 | void __init u300_spi_register_board_devices(void) |
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index 1da10e20e99..5f51bdeef0e 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
| 10 | */ | 10 | */ |
| 11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
| 12 | #include <linux/sched.h> | ||
| 12 | #include <linux/time.h> | 13 | #include <linux/time.h> |
| 13 | #include <linux/timex.h> | 14 | #include <linux/timex.h> |
| 14 | #include <linux/clockchips.h> | 15 | #include <linux/clockchips.h> |
| @@ -17,17 +18,14 @@ | |||
| 17 | #include <linux/io.h> | 18 | #include <linux/io.h> |
| 18 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
| 19 | #include <linux/err.h> | 20 | #include <linux/err.h> |
| 20 | #include <linux/irq.h> | ||
| 21 | 21 | ||
| 22 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
| 23 | #include <mach/irqs.h> | ||
| 24 | 23 | ||
| 25 | /* Generic stuff */ | 24 | /* Generic stuff */ |
| 26 | #include <asm/sched_clock.h> | 25 | #include <asm/sched_clock.h> |
| 27 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
| 28 | #include <asm/mach/time.h> | 27 | #include <asm/mach/time.h> |
| 29 | 28 | #include <asm/mach/irq.h> | |
| 30 | #include "timer.h" | ||
| 31 | 29 | ||
| 32 | /* | 30 | /* |
| 33 | * APP side special timer registers | 31 | * APP side special timer registers |
| @@ -339,10 +337,18 @@ static struct irqaction u300_timer_irq = { | |||
| 339 | * this wraps around for now, since it is just a relative time | 337 | * this wraps around for now, since it is just a relative time |
| 340 | * stamp. (Inspired by OMAP implementation.) | 338 | * stamp. (Inspired by OMAP implementation.) |
| 341 | */ | 339 | */ |
| 340 | static DEFINE_CLOCK_DATA(cd); | ||
| 341 | |||
| 342 | unsigned long long notrace sched_clock(void) | ||
| 343 | { | ||
| 344 | u32 cyc = readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); | ||
| 345 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
| 346 | } | ||
| 342 | 347 | ||
| 343 | static u32 notrace u300_read_sched_clock(void) | 348 | static void notrace u300_update_sched_clock(void) |
| 344 | { | 349 | { |
| 345 | return readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); | 350 | u32 cyc = readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); |
| 351 | update_sched_clock(&cd, cyc, (u32)~0); | ||
| 346 | } | 352 | } |
| 347 | 353 | ||
| 348 | 354 | ||
| @@ -357,10 +363,10 @@ static void __init u300_timer_init(void) | |||
| 357 | /* Clock the interrupt controller */ | 363 | /* Clock the interrupt controller */ |
| 358 | clk = clk_get_sys("apptimer", NULL); | 364 | clk = clk_get_sys("apptimer", NULL); |
| 359 | BUG_ON(IS_ERR(clk)); | 365 | BUG_ON(IS_ERR(clk)); |
| 360 | clk_prepare_enable(clk); | 366 | clk_enable(clk); |
| 361 | rate = clk_get_rate(clk); | 367 | rate = clk_get_rate(clk); |
| 362 | 368 | ||
| 363 | setup_sched_clock(u300_read_sched_clock, 32, rate); | 369 | init_sched_clock(&cd, u300_update_sched_clock, 32, rate); |
| 364 | 370 | ||
| 365 | /* | 371 | /* |
| 366 | * Disable the "OS" and "DD" timers - these are designed for Symbian! | 372 | * Disable the "OS" and "DD" timers - these are designed for Symbian! |
diff --git a/arch/arm/mach-u300/timer.h b/arch/arm/mach-u300/timer.h deleted file mode 100644 index b5e9791762e..00000000000 --- a/arch/arm/mach-u300/timer.h +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | extern struct sys_timer u300_timer; | ||
diff --git a/arch/arm/mach-u300/u300-gpio.h b/arch/arm/mach-u300/u300-gpio.h deleted file mode 100644 index 83f50772e16..00000000000 --- a/arch/arm/mach-u300/u300-gpio.h +++ /dev/null | |||
| @@ -1,70 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Individual pin assignments for the B335/S335. | ||
| 3 | * Notice that the actual usage of these pins depends on the | ||
| 4 | * PAD MUX settings, that is why the same number can potentially | ||
| 5 | * appear several times. In the reference design each pin is only | ||
| 6 | * used for one purpose. These were determined by inspecting the | ||
| 7 | * S365 schematic. | ||
| 8 | */ | ||
| 9 | #define U300_GPIO_PIN_UART_RX 0 | ||
| 10 | #define U300_GPIO_PIN_UART_TX 1 | ||
| 11 | #define U300_GPIO_PIN_UART_CTS 2 | ||
| 12 | #define U300_GPIO_PIN_UART_RTS 3 | ||
| 13 | #define U300_GPIO_PIN_CAM_MAIN_STANDBY 4 /* Camera MAIN standby */ | ||
| 14 | #define U300_GPIO_PIN_GPIO05 5 /* Unrouted */ | ||
| 15 | #define U300_GPIO_PIN_MS_CD 6 /* Memory Stick Card insertion */ | ||
| 16 | #define U300_GPIO_PIN_GPIO07 7 /* Test point TP2430 */ | ||
| 17 | |||
| 18 | #define U300_GPIO_PIN_GPIO08 8 /* Test point TP2437 */ | ||
| 19 | #define U300_GPIO_PIN_GPIO09 9 /* Test point TP2431 */ | ||
| 20 | #define U300_GPIO_PIN_GPIO10 10 /* Test point TP2432 */ | ||
| 21 | #define U300_GPIO_PIN_MMC_CLKRET 11 /* Clock return from MMC/SD card */ | ||
| 22 | #define U300_GPIO_PIN_MMC_CD 12 /* MMC Card insertion detection */ | ||
| 23 | #define U300_GPIO_PIN_CAM_SUB_STANDBY 13 /* Camera SUB standby */ | ||
| 24 | #define U300_GPIO_PIN_GPIO14 14 /* Test point TP2436 */ | ||
| 25 | #define U300_GPIO_PIN_GPIO15 15 /* Unrouted */ | ||
| 26 | |||
| 27 | #define U300_GPIO_PIN_GPIO16 16 /* Test point TP2438 */ | ||
| 28 | #define U300_GPIO_PIN_PHFSENSE 17 /* Headphone jack sensing */ | ||
| 29 | #define U300_GPIO_PIN_GPIO18 18 /* Test point TP2439 */ | ||
| 30 | #define U300_GPIO_PIN_GPIO19 19 /* Routed somewhere */ | ||
| 31 | #define U300_GPIO_PIN_GPIO20 20 /* Unrouted */ | ||
| 32 | #define U300_GPIO_PIN_GPIO21 21 /* Unrouted */ | ||
| 33 | #define U300_GPIO_PIN_GPIO22 22 /* Unrouted */ | ||
| 34 | #define U300_GPIO_PIN_GPIO23 23 /* Unrouted */ | ||
| 35 | |||
| 36 | #define U300_GPIO_PIN_GPIO24 24 /* Unrouted */ | ||
| 37 | #define U300_GPIO_PIN_GPIO25 25 /* Unrouted */ | ||
| 38 | #define U300_GPIO_PIN_GPIO26 26 /* Unrouted */ | ||
| 39 | #define U300_GPIO_PIN_GPIO27 27 /* Unrouted */ | ||
| 40 | #define U300_GPIO_PIN_GPIO28 28 /* Unrouted */ | ||
| 41 | #define U300_GPIO_PIN_GPIO29 29 /* Unrouted */ | ||
| 42 | #define U300_GPIO_PIN_GPIO30 30 /* Unrouted */ | ||
| 43 | #define U300_GPIO_PIN_GPIO31 31 /* Unrouted */ | ||
| 44 | |||
| 45 | #define U300_GPIO_PIN_GPIO32 32 /* Unrouted */ | ||
| 46 | #define U300_GPIO_PIN_GPIO33 33 /* Unrouted */ | ||
| 47 | #define U300_GPIO_PIN_GPIO34 34 /* Unrouted */ | ||
| 48 | #define U300_GPIO_PIN_GPIO35 35 /* Unrouted */ | ||
| 49 | #define U300_GPIO_PIN_GPIO36 36 /* Unrouted */ | ||
| 50 | #define U300_GPIO_PIN_GPIO37 37 /* Unrouted */ | ||
| 51 | #define U300_GPIO_PIN_GPIO38 38 /* Unrouted */ | ||
| 52 | #define U300_GPIO_PIN_GPIO39 39 /* Unrouted */ | ||
| 53 | |||
| 54 | #define U300_GPIO_PIN_GPIO40 40 /* Unrouted */ | ||
| 55 | #define U300_GPIO_PIN_GPIO41 41 /* Unrouted */ | ||
| 56 | #define U300_GPIO_PIN_GPIO42 42 /* Unrouted */ | ||
| 57 | #define U300_GPIO_PIN_GPIO43 43 /* Unrouted */ | ||
| 58 | #define U300_GPIO_PIN_GPIO44 44 /* Unrouted */ | ||
| 59 | #define U300_GPIO_PIN_GPIO45 45 /* Unrouted */ | ||
| 60 | #define U300_GPIO_PIN_GPIO46 46 /* Unrouted */ | ||
| 61 | #define U300_GPIO_PIN_GPIO47 47 /* Unrouted */ | ||
| 62 | |||
| 63 | #define U300_GPIO_PIN_GPIO48 48 /* Unrouted */ | ||
| 64 | #define U300_GPIO_PIN_GPIO49 49 /* Unrouted */ | ||
| 65 | #define U300_GPIO_PIN_GPIO50 50 /* Unrouted */ | ||
| 66 | #define U300_GPIO_PIN_GPIO51 51 /* Unrouted */ | ||
| 67 | #define U300_GPIO_PIN_GPIO52 52 /* Unrouted */ | ||
| 68 | #define U300_GPIO_PIN_GPIO53 53 /* Unrouted */ | ||
| 69 | #define U300_GPIO_PIN_GPIO54 54 /* Unrouted */ | ||
| 70 | #define U300_GPIO_PIN_GPIO55 55 /* Unrouted */ | ||
