aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/mp900.c
blob: 1fe8c76f09fc7a3514f2d4f3c29a7bb2f1d03b3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
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