Support AMCC Taihu 405EP Eval Board
Subsystems (2)
PATCH 1/2 Support AMCC Taihu 405EP Eval Board
This patch adds support for the AMCC Taihu 405EP
evaluation board.
I tested it against the latest Denx git tree
(2.6.17-rc3).
The defconfig file follows.
Comments are welcome.
Signed-off-by John Otken <[email protected]>
arch/ppc/platforms/4xx/Kconfig | 15 arch/ppc/platforms/4xx/Makefile | 1 arch/ppc/platforms/4xx/taihu.c | 260 +++++ arch/ppc/platforms/4xx/taihu.h | 105 ++ drivers/mtd/maps/Kconfig | 8 drivers/mtd/maps/Makefile | 1 drivers/mtd/maps/taihu.c | 155 +++ drivers/usb/gadget/Kconfig | 11 drivers/usb/gadget/Makefile | 1 drivers/usb/gadget/epautoconf.c | 15 drivers/usb/gadget/gadget_chips.h | 8 drivers/usb/gadget/pd12_udc.c | 1821 +++++++++++++++++++++++++++++++++++++ drivers/usb/gadget/pd12_udc.h | 148 +++ include/asm-ppc/ibm4xx.h | 4 14 files changed, 2548 insertions(+), 5 deletions(-) create mode 100644 arch/ppc/platforms/4xx/taihu.c create mode 100644 arch/ppc/platforms/4xx/taihu.h create mode 100644 drivers/mtd/maps/taihu.c create mode 100755 drivers/usb/gadget/pd12_udc.c create mode 100644 drivers/usb/gadget/pd12_udc.h
arch/ppc/platforms/4xx/Kconfig +10 -5
@@ -66,6 +66,12 @@ config XILINX_ML403 bool "Xilinx-ML403" help This option enables support for the Xilinx ML403 evaluation board. + +config TAIHU + bool "Taihu" + select WANT_EARLY_SERIAL + help + This option enables support for the AMCC 405EP evaluation board. endchoice choice
@@ -120,7 +126,6 @@ config YOSEMITE select WANT_EARLY_SERIAL help This option enables support for the AMCC PPC440EP evaluation board. - endchoice config EP405PC
@@ -201,7 +206,7 @@ config BOOKE config IBM_OCP bool - depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || P3P440 || PPChameleonEVB || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT || YELLOWSTONE || YOSEMITE + depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || P3P440 || PPChameleonEVB || REDWOOD_5 || REDWOOD_6 || SYCAMORE || TAIHU || WALNUT || YELLOWSTONE || YOSEMITE default y config IBM_EMAC4
@@ -211,7 +216,7 @@ config IBM_EMAC4 config BIOS_FIXUP bool - depends on BUBINGA || EP405 || SYCAMORE || WALNUT + depends on BUBINGA || EP405 || SYCAMORE || TAIHU || WALNUT default y # OAK doesn't exist but wanted to keep this around for any future 403GCX boards
@@ -222,7 +227,7 @@ config 403GCX config 405EP bool - depends on BUBINGA || PPChameleonEVB + depends on BUBINGA || PPChameleonEVB || TAIHU default y config 405GP
@@ -262,7 +267,7 @@ config EMBEDDEDBOOT config IBM_OPENBIOS bool - depends on ASH || REDWOOD_5 || REDWOOD_6 + depends on ASH || REDWOOD_5 || REDWOOD_6 || TAIHU default y config PPC4xx_DMA
arch/ppc/platforms/4xx/Makefile +1 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_PPChameleonEVB) += ppchamel obj-$(CONFIG_REDWOOD_5) += redwood5.o obj-$(CONFIG_REDWOOD_6) += redwood6.o obj-$(CONFIG_SYCAMORE) += sycamore.o +obj-$(CONFIG_TAIHU) += taihu.o obj-$(CONFIG_WALNUT) += walnut.o obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o
arch/ppc/platforms/4xx/taihu.c new file +260 -0
260 lines not on this page · raw message
arch/ppc/platforms/4xx/taihu.h new file +105 -0
105 lines not on this page · raw message
drivers/mtd/maps/Kconfig +8 -0
@@ -321,6 +321,14 @@ config MTD_ARCTIC Arctic board. If you have one of these boards and would like to use the flash chips on it, say 'Y'. +config MTD_TAIHU + tristate "Flash device mapped on AMCC 405EP Taihu" + depends on MTD_CFI && PPC32 && 40x && TAIHU + help + This enables access routines for the flash chips on the AMCC 405EP + Taihu board. If you have one of these boards and would like to + use the flash chips on it, say 'Y'. + config MTD_WALNUT tristate "Flash device mapped on AMCC 405GP/r/EP Walnut/Sycamore/Bubinga" depends on MTD_JEDECPROBE && (WALNUT || SYCAMORE || BUBINGA)
drivers/mtd/maps/Makefile +1 -0
@@ -58,6 +58,7 @@ obj-$(CONFIG_MTD_OCOTEA) += ocotea.o obj-$(CONFIG_MTD_BAMBOO) += bamboo.o obj-$(CONFIG_MTD_BEECH) += beech-mtd.o obj-$(CONFIG_MTD_ARCTIC) += arctic-mtd.o +obj-$(CONFIG_MTD_TAIHU) += taihu.o obj-$(CONFIG_MTD_WALNUT) += walnut.o obj-$(CONFIG_MTD_YOSEMITE) += yosemite.o obj-$(CONFIG_MTD_H720X) += h720x-flash.o
drivers/mtd/maps/taihu.c new file +155 -0
155 lines not on this page · raw message
drivers/usb/gadget/Kconfig +11 -0
@@ -154,6 +154,17 @@ config USB_LH7A40X default USB_GADGET select USB_GADGET_SELECTED +config USB_GADGET_PD12 + boolean "PD12 UDC" + depends on TAIHU + help + This driver provides USB Device Controller driver for PD12 UDC + +config USB_PD12 + tristate + depends on USB_GADGET_PD12 + default USB_GADGET + select USB_GADGET_SELECTED config USB_GADGET_OMAP boolean "OMAP USB Device Controller"
drivers/usb/gadget/Makefile +1 -0
@@ -8,6 +8,7 @@ obj-$(CONFIG_USB_GOKU) += goku_udc.o obj-$(CONFIG_USB_OMAP) += omap_udc.o obj-$(CONFIG_USB_LH7A40X) += lh7a40x_udc.o obj-$(CONFIG_USB_AT91) += at91_udc.o +obj-$(CONFIG_USB_PD12) += pd12_udc.o # # USB gadget drivers
drivers/usb/gadget/epautoconf.c +15 -0
@@ -274,6 +274,21 @@ struct usb_ep * __init usb_ep_autoconfig ep =find_ep (gadget,"ep1-bulk" );if (ep &&ep_matches (gadget, ep, desc))return ep; + + }else if (gadget_is_pd12 (gadget)) { +if (USB_ENDPOINT_XFER_BULK == type + && (USB_DIR_IN & desc->bEndpointAddress)) { +/* single buffering is enough */ + ep =find_ep (gadget,"ep2in-bulk" ); +if (ep &&ep_matches (gadget, ep, desc)) +return ep; + }else if (USB_ENDPOINT_XFER_BULK == type + && (USB_DIR_OUT & desc->bEndpointAddress)) { +/* DMA may be available */ + ep =find_ep (gadget,"ep1out-bulk" ); +if (ep &&ep_matches (gadget, ep, desc)) +return ep; + } }/* Second, look at endpoints until an unclaimed one looks usable */
drivers/usb/gadget/gadget_chips.h +8 -0
@@ -87,6 +87,12 @@#define gadget_is_at91 (g) 0#endif +#ifdef CONFIG_USB_GADGET_PD12 +#define gadget_is_pd12 (g) !strcmp("pd12_udc", (g)->name) +#else +#define gadget_is_pd12 (g) 0 +#endif +#ifdef CONFIG_USB_GADGET_IMX #define gadget_is_imx (g) !strcmp("imx_udc", (g)->name)#else
@@ -169,5 +175,7 @@ static inline int usb_gadget_controller_return 0x16 ; else if (gadget_is_mpc8272(gadget)) return 0x17; + else if (gadget_is_pd12(gadget)) + return 0x18;return -ENOENT ; }
drivers/usb/gadget/pd12_udc.c new file +1821 -0
1,821 lines not on this page · raw message
drivers/usb/gadget/pd12_udc.h new file +148 -0
148 lines not on this page · raw message
include/asm-ppc/ibm4xx.h +4 -0
@@ -47,6 +47,10 @@#include <platforms/4xx/sycamore.h> #endif +#if defined(CONFIG_TAIHU ) +#include <platforms/4xx/taihu.h> +#endif +#if defined(CONFIG_WALNUT )#include <platforms/4xx/walnut.h> #endif