diff options
Diffstat (limited to 'arch/arm/mach-pxa/mp900.c')
-rw-r--r-- | arch/arm/mach-pxa/mp900.c | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/mp900.c b/arch/arm/mach-pxa/mp900.c new file mode 100644 index 00000000000000..1fe8c76f09fc7a --- /dev/null +++ b/arch/arm/mach-pxa/mp900.c @@ -0,0 +1,114 @@ +/* + * linux/arch/arm/mach-pxa/mp900.c + * + * Support for the NEC MobilePro900/C platform + * + * this really does nothing so far... + * it was copied from a gumstix mach-pxa/gumstix.c + * + * this is where the machine specific initialisation for the + * MobilePro900/c should happen and at this stage every single line of code + * here is to be considered disposable and in need of re-write ... + * + * TODO lots of work on this file ... ;) + * + * Michael Petchkovsky mkpetch@internode.on.net + * 17 April 2007 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include <asm/types.h> + +#include <linux/init.h> +#include <linux/device.h> +#include <linux/platform_device.h> + +#include <asm/hardware.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +//#include <asm/arch/udc.h> +//#include <asm/arch/mmc.h> +#include <asm/arch/pxa-regs.h> +//#include <asm/arch/gumstix.h> +// asm/arch/mp900c.h for more mp900c specifics + +#include "generic.h" + +/* OK no mmc on mobilepro900 +static int gumstix_mci_init(struct device *dev, irqreturn_t (*lubbock_detect_int)(int, void *, struct pt_regs *), void *data) +{ + // Set up MMC controller + pxa_gpio_mode(GPIO6_MMCCLK_MD); + pxa_gpio_mode(GPIO53_MMCCLK_MD); + pxa_gpio_mode(GPIO8_MMCCS0_MD); + + return 0; +} + +static struct pxamci_platform_data gumstix_mci_platform_data = { + .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, + .init = &gumstix_mci_init, +}; +*/ + +/* OK no nothing much yet ... + * comment it all +static int gumstix_udc_is_connected(void) +{ + return !! (GPLR(GPIO_GUMSTIX_USB_GPIOn) & GPIO_bit(GPIO_GUMSTIX_USB_GPIOn)); +} + +static void gumstix_udc_command(int connect_command) +{ + if (connect_command == PXA2XX_UDC_CMD_CONNECT) { + pxa_gpio_mode(GPIO_GUMSTIX_USB_GPIOx_CON_MD); + GPSR(GPIO_GUMSTIX_USB_GPIOx) = GPIO_bit(GPIO_GUMSTIX_USB_GPIOx); + } + if (connect_command == PXA2XX_UDC_CMD_DISCONNECT) { + GPCR(GPIO_GUMSTIX_USB_GPIOx) = GPIO_bit(GPIO_GUMSTIX_USB_GPIOx); + pxa_gpio_mode(GPIO_GUMSTIX_USB_GPIOx_DIS_MD); + } +} + +static struct pxa2xx_udc_mach_info gumstix_udc_info __initdata = { + .udc_is_connected = gumstix_udc_is_connected, + .udc_command = gumstix_udc_command, +}; + +*/ + +static struct platform_device mp900c_dummy_device = { + .name = "mp900c_dummy", + .id = -1, +}; + + +static struct platform_device *devices[] __initdata = { + &mp900c_dummy_device, +}; + + +static void __init mp900c_init(void) +{ + //pxa_set_mci_info(&gumstix_mci_platform_data); + //pxa_set_udc_info(&gumstix_udc_info); + printk (KERN_NOTICE "MobilePro900C init routine\n"); + (void) platform_add_devices(devices, ARRAY_SIZE(devices)); +} + + + +MACHINE_START(NEC_MP900, "MobilePro900C") + //.phys_ram = 0xa4000000, ??? + //.phys_ram = 0xa0000000, + .phys_io = 0x40000000, + .boot_params = 0xa0000100, // means what? + .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, + .timer = &pxa_timer, + .map_io = pxa_map_io, + .init_irq = pxa_init_irq, + .init_machine = mp900c_init, +MACHINE_END |