Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[ARM] 3857/2: pnx4008: add devices' registration

This patch adds platform devices' registration for the devices which drivers
either have been added to the mainline or on the way to.

arch/arm/mach-pnx4008/core.c | 69 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Vitaly Wool and committed by
Russell King
8cc05f79 088406bc

+69
+69
arch/arm/mach-pnx4008/core.c
··· 133 133 }, 134 134 }; 135 135 136 + static struct platform_device nand_flash_device = { 137 + .name = "pnx4008-flash", 138 + .id = -1, 139 + .dev = { 140 + .coherent_dma_mask = 0xFFFFFFFF, 141 + }, 142 + }; 143 + 144 + /* The dmamask must be set for OHCI to work */ 145 + static u64 ohci_dmamask = ~(u32) 0; 146 + 147 + static struct resource ohci_resources[] = { 148 + { 149 + .start = IO_ADDRESS(PNX4008_USB_CONFIG_BASE), 150 + .end = IO_ADDRESS(PNX4008_USB_CONFIG_BASE + 0x100), 151 + .flags = IORESOURCE_MEM, 152 + }, { 153 + .start = USB_HOST_INT, 154 + .flags = IORESOURCE_IRQ, 155 + }, 156 + }; 157 + 158 + static struct platform_device ohci_device = { 159 + .name = "pnx4008-usb-ohci", 160 + .id = -1, 161 + .dev = { 162 + .dma_mask = &ohci_dmamask, 163 + .coherent_dma_mask = 0xffffffff, 164 + }, 165 + .num_resources = ARRAY_SIZE(ohci_resources), 166 + .resource = ohci_resources, 167 + }; 168 + 169 + static struct platform_device sdum_device = { 170 + .name = "pnx4008-sdum", 171 + .id = 0, 172 + .dev = { 173 + .coherent_dma_mask = 0xffffffff, 174 + }, 175 + }; 176 + 177 + static struct platform_device rgbfb_device = { 178 + .name = "pnx4008-rgbfb", 179 + .id = 0, 180 + .dev = { 181 + .coherent_dma_mask = 0xffffffff, 182 + } 183 + }; 184 + 185 + struct resource watchdog_resources[] = { 186 + { 187 + .start = PNX4008_WDOG_BASE, 188 + .end = PNX4008_WDOG_BASE + SZ_4K - 1, 189 + .flags = IORESOURCE_MEM, 190 + }, 191 + }; 192 + 193 + static struct platform_device watchdog_device = { 194 + .name = "pnx4008-watchdog", 195 + .id = -1, 196 + .num_resources = ARRAY_SIZE(watchdog_resources), 197 + .resource = watchdog_resources, 198 + }; 199 + 136 200 static struct platform_device *devices[] __initdata = { 137 201 &spipnx_1, 138 202 &spipnx_2, 139 203 &serial_device, 204 + &ohci_device, 205 + &nand_flash_device, 206 + &sdum_device, 207 + &rgbfb_device, 208 + &watchdog_device, 140 209 }; 141 210 142 211