diff options
Diffstat (limited to 'arch/powerpc/platforms/44x')
-rw-r--r-- | arch/powerpc/platforms/44x/Kconfig | 60 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/apollo3g-gpio.c | 66 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/beech-usb.c | 110 | ||||
-rwxr-xr-x | arch/powerpc/platforms/44x/bluestone-usb.c | 110 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/ppc44x_simple.c | 5 |
6 files changed, 350 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig index 7486bffd3eb..642036461cd 100644 --- a/arch/powerpc/platforms/44x/Kconfig +++ b/arch/powerpc/platforms/44x/Kconfig @@ -89,9 +89,32 @@ config ARCHES select 460EX # Odd since it uses 460GT but the effects are the same select PCI select PPC4xx_PCI_EXPRESS + select IBM_NEW_EMAC_RGMII help This option enables support for the AMCC Dual PPC460GT evaluation board. +config BEECH + bool "Beech" + depends on 44x + default n + select PPC44x_SIMPLE + select APM82181 + select PPC4xx_PCI_EXPRESS + select IBM_NEW_EMAC_RGMII + help + This option enables support for the AMCC APM82181 validation board. + +config APOLLO3G + bool "Apollo3G" + depends on 44x + default n + select PPC44x_SIMPLE + select APM82181 + select PPC4xx_PCI_EXPRESS + select IBM_NEW_EMAC_RGMII + help + This option enables support for the WDC Apollo3G NAS. + config CANYONLANDS bool "Canyonlands" depends on 44x @@ -105,6 +128,20 @@ config CANYONLANDS help This option enables support for the AMCC PPC460EX evaluation board. +config ACER + bool "Acer 460EX/EXr/431EXr" + depends on 44x + default n + select 460EX + select PPC44x_SIMPLE + select PCI + select PPC4xx_PCI_EXPRESS + select IBM_NEW_EMAC_RGMII + select IBM_NEW_EMAC_ZMII + + help + This option enables support for the AMCC Acer validation board. Acer board has socketed CPU - but ONLY 460EX and 460EX variants (460EXr/431EXr) are currently supported. + config GLACIER bool "Glacier" depends on 44x @@ -209,6 +246,19 @@ config PPC4xx_GPIO help Enable gpiolib support for ppc440 based boards +config PPC4xx_OCM + bool "PPC4xx On Chip Memory (OCM) support" + depends on 4xx + select PPC_LIB_RHEAP + help + Enable OCM support for PowerPC 4xx platforms with on chip memory. + +config PPC4xx_CPM + bool "PPC4xx Clock Power Management (CPM) support" + depends on 4xx + help + Enable CPM support for PowerPC 4xx platforms. + # 44x specific CPU modules, selected based on the board above. config 440EP bool @@ -237,8 +287,8 @@ config 440GP config 440GX bool select IBM_NEW_EMAC_EMAC4 - select IBM_NEW_EMAC_RGMII - select IBM_NEW_EMAC_ZMII #test only +# select IBM_NEW_EMAC_RGMII +# select IBM_NEW_EMAC_ZMII #test only select IBM_NEW_EMAC_TAH #test only config 440SP @@ -262,6 +312,12 @@ config 460SX select IBM_NEW_EMAC_ZMII select IBM_NEW_EMAC_TAH +config APM82181 + bool + select PPC_FPU + select IBM_NEW_EMAC_EMAC4 + select IBM_NEW_EMAC_TAH + # 44x errata/workaround config symbols, selected by the CPU models above config IBM440EP_ERR42 bool diff --git a/arch/powerpc/platforms/44x/Makefile b/arch/powerpc/platforms/44x/Makefile index ee6185aeaa3..fd5583c8e86 100644 --- a/arch/powerpc/platforms/44x/Makefile +++ b/arch/powerpc/platforms/44x/Makefile @@ -5,3 +5,5 @@ obj-$(CONFIG_SAM440EP) += sam440ep.o obj-$(CONFIG_WARP) += warp.o obj-$(CONFIG_XILINX_VIRTEX_5_FXT) += virtex.o obj-$(CONFIG_XILINX_ML510) += virtex_ml510.o +obj-$(CONFIG_BEECH) += beech-usb.o +obj-$(CONFIG_APOLLO3G) += apollo3g-gpio.o diff --git a/arch/powerpc/platforms/44x/apollo3g-gpio.c b/arch/powerpc/platforms/44x/apollo3g-gpio.c new file mode 100644 index 00000000000..2601020dd92 --- /dev/null +++ b/arch/powerpc/platforms/44x/apollo3g-gpio.c @@ -0,0 +1,66 @@ +/* + * (c) Copyright 2010 Western Digital Technologies, Inc. All Rights Reserved. + * + * /sys drivers for GPIO pins + */ + +#include <linux/platform_device.h> +#include <linux/of_platform.h> + + +/* + * resource data should be in dts file, but, for now ... + */ +static struct resource apollo3g_gpio1_resources[] = { + [0] = { + .start = 0xe0000000, + .end = 0xe0000003, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device apollo3g_gpio1_device = { + .name = "apollo3g_gpio1", + .id = 0, + .num_resources = ARRAY_SIZE(apollo3g_gpio1_resources), + .resource = apollo3g_gpio1_resources, +}; + +static struct resource apollo3g_gpio2_resources[] = { + [0] = { + .start = 0xe1000000, + .end = 0xe1000003, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device apollo3g_gpio2_device = { + .name = "apollo3g_gpio2", + .id = 0, + .num_resources = ARRAY_SIZE(apollo3g_gpio2_resources), + .resource = apollo3g_gpio2_resources, +}; + +static struct platform_device *apollo3g_devs[] __initdata = { + &apollo3g_gpio1_device, + &apollo3g_gpio2_device, +}; + +static const struct of_device_id apollo3g_gpio_match[] = { + { .compatible = "amcc,apollo3g", }, + {} +}; + +static struct of_platform_driver apollo3g_gpio_driver = { + .name = "apollo3g-gpio", +}; + +static int __init apollo3g_gpio_init(void) +{ + printk(KERN_INFO "%s: GPIO 1 @ 0x%llx; GPIO 2 @ 0x%llx\n", + __FUNCTION__, apollo3g_gpio1_device.resource[0].start, + apollo3g_gpio2_device.resource[0].start); + + return of_register_platform_driver(&apollo3g_gpio_driver); +} +device_initcall(apollo3g_gpio_init); diff --git a/arch/powerpc/platforms/44x/beech-usb.c b/arch/powerpc/platforms/44x/beech-usb.c new file mode 100644 index 00000000000..f3fa2613737 --- /dev/null +++ b/arch/powerpc/platforms/44x/beech-usb.c @@ -0,0 +1,110 @@ +/* + * AMCC Kilauea USB-OTG wrapper + * + * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de> + * + * Extract the resources (MEM & IRQ) from the dts file and put them + * into the platform-device struct for usage in the platform-device + * USB-OTG driver. + * + */ + +#include <linux/platform_device.h> +#include <linux/of_platform.h> +#define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL)) +#define U64_TO_U32_HIGH(val) ((u32)((val) >> 32)) + + +/* + * Resource template will be filled dynamically with the values + * extracted from the dts file + */ +static struct resource usb_otg_resources[] = { + [0] = { + /* 405EX USB-OTG registers */ + .flags = IORESOURCE_MEM, + }, + [1] = { + /* 405EX OTG IRQ */ + .flags = IORESOURCE_IRQ, + }, + [2] = { + /* High-Power workaround IRQ */ + .flags = IORESOURCE_IRQ, + }, + [3] = { + /* 405EX DMA IRQ */ + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 dma_mask = 0xffffffffULL; + +static struct platform_device usb_otg_device = { + .name = "dwc_otg", + .id = 0, + .num_resources = ARRAY_SIZE(usb_otg_resources), + .resource = usb_otg_resources, + .dev = { + .dma_mask = &dma_mask, + .coherent_dma_mask = 0xffffffffULL, + } +}; + +static struct platform_device *ppc405ex_devs[] __initdata = { + &usb_otg_device, +}; + +static int __devinit ppc405ex_usb_otg_probe(struct of_device *ofdev, + const struct of_device_id *match) +{ + struct device_node *np = ofdev->node; + struct resource res; + + /* + * Extract register address reange from device tree and put it into + * the platform device structure + */ + if (of_address_to_resource(np, 0, &res)) { + printk(KERN_ERR "%s: Can't get USB-OTG register address\n", __func__); + return -ENOMEM; + } + usb_otg_resources[0].start = res.start; + usb_otg_resources[0].end = res.end; + + /* + * Extract IRQ number(s) from device tree and put them into + * the platform device structure + */ + usb_otg_resources[1].start = usb_otg_resources[1].end = + irq_of_parse_and_map(np, 0); + usb_otg_resources[2].start = usb_otg_resources[2].end = + irq_of_parse_and_map(np, 1); + usb_otg_resources[3].start = usb_otg_resources[3].end = + irq_of_parse_and_map(np, 2); + return platform_add_devices(ppc405ex_devs, ARRAY_SIZE(ppc405ex_devs)); +} + +static int __devexit ppc405ex_usb_otg_remove(struct of_device *ofdev) +{ + /* Nothing to do here */ + return 0; +} + +static const struct of_device_id ppc405ex_usb_otg_match[] = { + { .compatible = "amcc,usb-otg-405ex", }, + {} +}; + +static struct of_platform_driver ppc405ex_usb_otg_driver = { + .name = "ppc405ex-usb-otg", + .match_table = ppc405ex_usb_otg_match, + .probe = ppc405ex_usb_otg_probe, + .remove = ppc405ex_usb_otg_remove, +}; + +static int __init ppc405ex_usb_otg_init(void) +{ + return of_register_platform_driver(&ppc405ex_usb_otg_driver); +} +device_initcall(ppc405ex_usb_otg_init); diff --git a/arch/powerpc/platforms/44x/bluestone-usb.c b/arch/powerpc/platforms/44x/bluestone-usb.c new file mode 100755 index 00000000000..06a8dcc5c96 --- /dev/null +++ b/arch/powerpc/platforms/44x/bluestone-usb.c @@ -0,0 +1,110 @@ +/* + * AMCC Bluestone USB-OTG wrapper + * + * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de> + * + * Extract the resources (MEM & IRQ) from the dts file and put them + * into the platform-device struct for usage in the platform-device + * USB-OTG driver. + * + */ + +#include <linux/platform_device.h> +#include <linux/of_platform.h> +#define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL)) +#define U64_TO_U32_HIGH(val) ((u32)((val) >> 32)) + + +/* + * Resource template will be filled dynamically with the values + * extracted from the dts file + */ +static struct resource usb_otg_resources[] = { + [0] = { + /* 405EX USB-OTG registers */ + .flags = IORESOURCE_MEM, + }, + [1] = { + /* 405EX OTG IRQ */ + .flags = IORESOURCE_IRQ, + }, + [2] = { + /* High-Power workaround IRQ */ + .flags = IORESOURCE_IRQ, + }, + [3] = { + /* 405EX DMA IRQ */ + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 dma_mask = 0xffffffffULL; + +static struct platform_device usb_otg_device = { + .name = "dwc_otg", + .id = 0, + .num_resources = ARRAY_SIZE(usb_otg_resources), + .resource = usb_otg_resources, + .dev = { + .dma_mask = &dma_mask, + .coherent_dma_mask = 0xffffffffULL, + } +}; + +static struct platform_device *ppc405ex_devs[] __initdata = { + &usb_otg_device, +}; + +static int __devinit ppc405ex_usb_otg_probe(struct of_device *ofdev, + const struct of_device_id *match) +{ + struct device_node *np = ofdev->node; + struct resource res; + + /* + * Extract register address reange from device tree and put it into + * the platform device structure + */ + if (of_address_to_resource(np, 0, &res)) { + printk(KERN_ERR "%s: Can't get USB-OTG register address\n", __func__); + return -ENOMEM; + } + usb_otg_resources[0].start = res.start; + usb_otg_resources[0].end = res.end; + + /* + * Extract IRQ number(s) from device tree and put them into + * the platform device structure + */ + usb_otg_resources[1].start = usb_otg_resources[1].end = + irq_of_parse_and_map(np, 0); + usb_otg_resources[2].start = usb_otg_resources[2].end = + irq_of_parse_and_map(np, 1); + usb_otg_resources[3].start = usb_otg_resources[3].end = + irq_of_parse_and_map(np, 2); + return platform_add_devices(ppc405ex_devs, ARRAY_SIZE(ppc405ex_devs)); +} + +static int __devexit ppc405ex_usb_otg_remove(struct of_device *ofdev) +{ + /* Nothing to do here */ + return 0; +} + +static const struct of_device_id ppc405ex_usb_otg_match[] = { + { .compatible = "amcc,usb-otg-405ex", }, + {} +}; + +static struct of_platform_driver ppc405ex_usb_otg_driver = { + .name = "ppc405ex-usb-otg", + .match_table = ppc405ex_usb_otg_match, + .probe = ppc405ex_usb_otg_probe, + .remove = ppc405ex_usb_otg_remove, +}; + +static int __init ppc405ex_usb_otg_init(void) +{ + return of_register_platform_driver(&ppc405ex_usb_otg_driver); +} +device_initcall(ppc405ex_usb_otg_init); diff --git a/arch/powerpc/platforms/44x/ppc44x_simple.c b/arch/powerpc/platforms/44x/ppc44x_simple.c index e8c23ccaa1f..2c78cc8bc59 100644 --- a/arch/powerpc/platforms/44x/ppc44x_simple.c +++ b/arch/powerpc/platforms/44x/ppc44x_simple.c @@ -52,6 +52,8 @@ machine_device_initcall(ppc44x_simple, ppc44x_device_probe); static char *board[] __initdata = { "amcc,arches", "amcc,bamboo", + "amcc,beech", + "amcc,apollo3g", "amcc,canyonlands", "amcc,glacier", "ibm,ebony", @@ -61,7 +63,8 @@ static char *board[] __initdata = { "amcc,redwood", "amcc,sequoia", "amcc,taishan", - "amcc,yosemite" + "amcc,yosemite", + "amcc,acer" }; static int __init ppc44x_probe(void) |