aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/eseries.h16
-rw-r--r--arch/arm/mach-pxa/include/mach/arcom-pcmcia.h11
-rw-r--r--arch/arm/mach-pxa/include/mach/camera.h44
-rw-r--r--arch/arm/mach-pxa/include/mach/entry-macro.S51
-rw-r--r--arch/arm/mach-pxa/include/mach/irda.h25
-rw-r--r--arch/arm/mach-pxa/include/mach/memory.h20
-rw-r--r--arch/arm/mach-pxa/include/mach/mmc.h28
-rw-r--r--arch/arm/mach-pxa/include/mach/ohci.h36
-rw-r--r--arch/arm/mach-pxa/include/mach/palmasoc.h8
-rw-r--r--arch/arm/mach-pxa/include/mach/pata_pxa.h33
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa3xx-u2d.h35
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa930_rotary.h20
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa930_trkball.h10
-rw-r--r--arch/arm/mach-pxa/include/mach/pxafb.h162
-rw-r--r--arch/arm/mach-pxa/include/mach/system.h23
-rw-r--r--arch/arm/mach-pxa/include/mach/vmalloc.h11
-rw-r--r--arch/arm/mach-pxa/leds-idp.c116
-rw-r--r--arch/arm/mach-pxa/leds-lubbock.c125
-rw-r--r--arch/arm/mach-pxa/leds-mainstone.c120
-rw-r--r--arch/arm/mach-pxa/leds.c32
-rw-r--r--arch/arm/mach-pxa/leds.h13
-rw-r--r--arch/arm/mach-pxa/pxa95x.c295
-rw-r--r--arch/arm/mach-pxa/saarb.c114
-rw-r--r--arch/arm/mach-pxa/tavorevb3.c135
24 files changed, 1483 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/eseries.h b/arch/arm/mach-pxa/eseries.h
new file mode 100644
index 00000000000..5930f5e2a12
--- /dev/null
+++ b/arch/arm/mach-pxa/eseries.h
@@ -0,0 +1,16 @@
1void __init eseries_fixup(struct machine_desc *desc,
2 struct tag *tags, char **cmdline, struct meminfo *mi);
3
4extern struct pxa2xx_udc_mach_info e7xx_udc_mach_info;
5extern struct pxaficp_platform_data e7xx_ficp_platform_data;
6extern int e7xx_irda_init(void);
7
8extern int eseries_tmio_enable(struct platform_device *dev);
9extern int eseries_tmio_disable(struct platform_device *dev);
10extern int eseries_tmio_suspend(struct platform_device *dev);
11extern int eseries_tmio_resume(struct platform_device *dev);
12extern void eseries_get_tmio_gpios(void);
13extern struct resource eseries_tmio_resources[];
14extern struct platform_device e300_tc6387xb_device;
15extern void eseries_register_clks(void);
16
diff --git a/arch/arm/mach-pxa/include/mach/arcom-pcmcia.h b/arch/arm/mach-pxa/include/mach/arcom-pcmcia.h
new file mode 100644
index 00000000000..d428be4db44
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/arcom-pcmcia.h
@@ -0,0 +1,11 @@
1#ifndef __ARCOM_PCMCIA_H
2#define __ARCOM_PCMCIA_H
3
4struct arcom_pcmcia_pdata {
5 int cd_gpio;
6 int rdy_gpio;
7 int pwr_gpio;
8 void (*reset)(int state);
9};
10
11#endif
diff --git a/arch/arm/mach-pxa/include/mach/camera.h b/arch/arm/mach-pxa/include/mach/camera.h
new file mode 100644
index 00000000000..6709b1cd7c7
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/camera.h
@@ -0,0 +1,44 @@
1/*
2 camera.h - PXA camera driver header file
3
4 Copyright (C) 2003, Intel Corporation
5 Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20*/
21
22#ifndef __ASM_ARCH_CAMERA_H_
23#define __ASM_ARCH_CAMERA_H_
24
25#define PXA_CAMERA_MASTER 1
26#define PXA_CAMERA_DATAWIDTH_4 2
27#define PXA_CAMERA_DATAWIDTH_5 4
28#define PXA_CAMERA_DATAWIDTH_8 8
29#define PXA_CAMERA_DATAWIDTH_9 0x10
30#define PXA_CAMERA_DATAWIDTH_10 0x20
31#define PXA_CAMERA_PCLK_EN 0x40
32#define PXA_CAMERA_MCLK_EN 0x80
33#define PXA_CAMERA_PCP 0x100
34#define PXA_CAMERA_HSP 0x200
35#define PXA_CAMERA_VSP 0x400
36
37struct pxacamera_platform_data {
38 unsigned long flags;
39 unsigned long mclk_10khz;
40};
41
42extern void pxa_set_camera_info(struct pxacamera_platform_data *);
43
44#endif /* __ASM_ARCH_CAMERA_H_ */
diff --git a/arch/arm/mach-pxa/include/mach/entry-macro.S b/arch/arm/mach-pxa/include/mach/entry-macro.S
new file mode 100644
index 00000000000..a73bc86a3c2
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/entry-macro.S
@@ -0,0 +1,51 @@
1/*
2 * arch/arm/mach-pxa/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for PXA-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/hardware.h>
11#include <mach/irqs.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro get_irqnr_preamble, base, tmp
17 .endm
18
19 .macro arch_ret_to_user, tmp1, tmp2
20 .endm
21
22 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
23 mrc p15, 0, \tmp, c0, c0, 0 @ CPUID
24 mov \tmp, \tmp, lsr #13
25 and \tmp, \tmp, #0x7 @ Core G
26 cmp \tmp, #1
27 bhi 1002f
28
29 @ Core Generation 1 (PXA25x)
30 mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000
31 add \base, \base, #0x00d00000
32 ldr \irqstat, [\base, #0] @ ICIP
33 ldr \irqnr, [\base, #4] @ ICMR
34
35 ands \irqnr, \irqstat, \irqnr
36 beq 1001f
37 rsb \irqstat, \irqnr, #0
38 and \irqstat, \irqstat, \irqnr
39 clz \irqnr, \irqstat
40 rsb \irqnr, \irqnr, #(31 + PXA_IRQ(0))
41 b 1001f
421002:
43 @ Core Generation 2 (PXA27x) or Core Generation 3 (PXA3xx)
44 mrc p6, 0, \irqstat, c5, c0, 0 @ ICHP
45 tst \irqstat, #0x80000000
46 beq 1001f
47 bic \irqstat, \irqstat, #0x80000000
48 mov \irqnr, \irqstat, lsr #16
49 add \irqnr, \irqnr, #(PXA_IRQ(0))
501001:
51 .endm
diff --git a/arch/arm/mach-pxa/include/mach/irda.h b/arch/arm/mach-pxa/include/mach/irda.h
new file mode 100644
index 00000000000..3cd41f77dda
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/irda.h
@@ -0,0 +1,25 @@
1#ifndef ASMARM_ARCH_IRDA_H
2#define ASMARM_ARCH_IRDA_H
3
4/* board specific transceiver capabilities */
5
6#define IR_OFF 1
7#define IR_SIRMODE 2
8#define IR_FIRMODE 4
9
10struct pxaficp_platform_data {
11 int transceiver_cap;
12 void (*transceiver_mode)(struct device *dev, int mode);
13 int (*startup)(struct device *dev);
14 void (*shutdown)(struct device *dev);
15 int gpio_pwdown; /* powerdown GPIO for the IrDA chip */
16 bool gpio_pwdown_inverted; /* gpio_pwdown is inverted */
17};
18
19extern void pxa_set_ficp_info(struct pxaficp_platform_data *info);
20
21#if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
22void pxa2xx_transceiver_mode(struct device *dev, int mode);
23#endif
24
25#endif
diff --git a/arch/arm/mach-pxa/include/mach/memory.h b/arch/arm/mach-pxa/include/mach/memory.h
new file mode 100644
index 00000000000..d05a59727d6
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/memory.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-pxa/include/mach/memory.h
3 *
4 * Author: Nicolas Pitre
5 * Copyright: (C) 2001 MontaVista Software Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __ASM_ARCH_MEMORY_H
13#define __ASM_ARCH_MEMORY_H
14
15/*
16 * Physical DRAM offset.
17 */
18#define PLAT_PHYS_OFFSET UL(0xa0000000)
19
20#endif
diff --git a/arch/arm/mach-pxa/include/mach/mmc.h b/arch/arm/mach-pxa/include/mach/mmc.h
new file mode 100644
index 00000000000..9eb515bb799
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/mmc.h
@@ -0,0 +1,28 @@
1#ifndef ASMARM_ARCH_MMC_H
2#define ASMARM_ARCH_MMC_H
3
4#include <linux/mmc/host.h>
5#include <linux/interrupt.h>
6
7struct device;
8struct mmc_host;
9
10struct pxamci_platform_data {
11 unsigned int ocr_mask; /* available voltages */
12 unsigned long detect_delay_ms; /* delay in millisecond before detecting cards after interrupt */
13 int (*init)(struct device *, irq_handler_t , void *);
14 int (*get_ro)(struct device *);
15 void (*setpower)(struct device *, unsigned int);
16 void (*exit)(struct device *, void *);
17 int gpio_card_detect; /* gpio detecting card insertion */
18 int gpio_card_ro; /* gpio detecting read only toggle */
19 bool gpio_card_ro_invert; /* gpio ro is inverted */
20 int gpio_power; /* gpio powering up MMC bus */
21 bool gpio_power_invert; /* gpio power is inverted */
22};
23
24extern void pxa_set_mci_info(struct pxamci_platform_data *info);
25extern void pxa3xx_set_mci2_info(struct pxamci_platform_data *info);
26extern void pxa3xx_set_mci3_info(struct pxamci_platform_data *info);
27
28#endif
diff --git a/arch/arm/mach-pxa/include/mach/ohci.h b/arch/arm/mach-pxa/include/mach/ohci.h
new file mode 100644
index 00000000000..95b6e2a6e51
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/ohci.h
@@ -0,0 +1,36 @@
1#ifndef ASMARM_ARCH_OHCI_H
2#define ASMARM_ARCH_OHCI_H
3
4struct device;
5
6struct pxaohci_platform_data {
7 int (*init)(struct device *);
8 void (*exit)(struct device *);
9
10 unsigned long flags;
11#define ENABLE_PORT1 (1 << 0)
12#define ENABLE_PORT2 (1 << 1)
13#define ENABLE_PORT3 (1 << 2)
14#define ENABLE_PORT_ALL (ENABLE_PORT1 | ENABLE_PORT2 | ENABLE_PORT3)
15
16#define POWER_SENSE_LOW (1 << 3)
17#define POWER_CONTROL_LOW (1 << 4)
18#define NO_OC_PROTECTION (1 << 5)
19#define OC_MODE_GLOBAL (0 << 6)
20#define OC_MODE_PERPORT (1 << 6)
21
22 int power_on_delay; /* Power On to Power Good time - in ms
23 * HCD must wait for this duration before
24 * accessing a powered on port
25 */
26 int port_mode;
27#define PMM_NPS_MODE 1
28#define PMM_GLOBAL_MODE 2
29#define PMM_PERPORT_MODE 3
30
31 int power_budget;
32};
33
34extern void pxa_set_ohci_info(struct pxaohci_platform_data *info);
35
36#endif
diff --git a/arch/arm/mach-pxa/include/mach/palmasoc.h b/arch/arm/mach-pxa/include/mach/palmasoc.h
new file mode 100644
index 00000000000..58afb30d529
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/palmasoc.h
@@ -0,0 +1,8 @@
1#ifndef _INCLUDE_PALMASOC_H_
2#define _INCLUDE_PALMASOC_H_
3
4struct palm27x_asoc_info {
5 int jack_gpio;
6};
7
8#endif
diff --git a/arch/arm/mach-pxa/include/mach/pata_pxa.h b/arch/arm/mach-pxa/include/mach/pata_pxa.h
new file mode 100644
index 00000000000..6cf7df1d583
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/pata_pxa.h
@@ -0,0 +1,33 @@
1/*
2 * Generic PXA PATA driver
3 *
4 * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; see the file COPYING. If not, write to
18 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21#ifndef __MACH_PATA_PXA_H__
22#define __MACH_PATA_PXA_H__
23
24struct pata_pxa_pdata {
25 /* PXA DMA DREQ<0:2> pin */
26 uint32_t dma_dreq;
27 /* Register shift */
28 uint32_t reg_shift;
29 /* IRQ flags */
30 uint32_t irq_flags;
31};
32
33#endif /* __MACH_PATA_PXA_H__ */
diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx-u2d.h b/arch/arm/mach-pxa/include/mach/pxa3xx-u2d.h
new file mode 100644
index 00000000000..9d82cb65ea5
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/pxa3xx-u2d.h
@@ -0,0 +1,35 @@
1/*
2 * PXA3xx U2D header
3 *
4 * Copyright (C) 2010 CompuLab Ltd.
5 *
6 * Igor Grinberg <grinberg@compulab.co.il>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12#ifndef __PXA310_U2D__
13#define __PXA310_U2D__
14
15#include <linux/usb/ulpi.h>
16
17struct pxa3xx_u2d_platform_data {
18
19#define ULPI_SER_6PIN (1 << 0)
20#define ULPI_SER_3PIN (1 << 1)
21 unsigned int ulpi_mode;
22
23 int (*init)(struct device *);
24 void (*exit)(struct device *);
25};
26
27
28/* Start PXA3xx U2D host */
29int pxa3xx_u2d_start_hc(struct usb_bus *host);
30/* Stop PXA3xx U2D host */
31void pxa3xx_u2d_stop_hc(struct usb_bus *host);
32
33extern void pxa3xx_set_u2d_info(struct pxa3xx_u2d_platform_data *info);
34
35#endif /* __PXA310_U2D__ */
diff --git a/arch/arm/mach-pxa/include/mach/pxa930_rotary.h b/arch/arm/mach-pxa/include/mach/pxa930_rotary.h
new file mode 100644
index 00000000000..053587caffd
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/pxa930_rotary.h
@@ -0,0 +1,20 @@
1#ifndef __ASM_ARCH_PXA930_ROTARY_H
2#define __ASM_ARCH_PXA930_ROTARY_H
3
4/* NOTE:
5 *
6 * rotary can be either interpreted as a ralative input event (e.g.
7 * REL_WHEEL or REL_HWHEEL) or a specific key event (e.g. UP/DOWN
8 * or LEFT/RIGHT), depending on if up_key & down_key are assigned
9 * or rel_code is assigned a non-zero value. When all are non-zero,
10 * up_key and down_key will be preferred.
11 */
12struct pxa930_rotary_platform_data {
13 int up_key;
14 int down_key;
15 int rel_code;
16};
17
18void __init pxa930_set_rotarykey_info(struct pxa930_rotary_platform_data *info);
19
20#endif /* __ASM_ARCH_PXA930_ROTARY_H */
diff --git a/arch/arm/mach-pxa/include/mach/pxa930_trkball.h b/arch/arm/mach-pxa/include/mach/pxa930_trkball.h
new file mode 100644
index 00000000000..5e0789bc472
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/pxa930_trkball.h
@@ -0,0 +1,10 @@
1#ifndef __ASM_ARCH_PXA930_TRKBALL_H
2#define __ASM_ARCH_PXA930_TRKBALL_H
3
4struct pxa930_trkball_platform_data {
5 int x_filter;
6 int y_filter;
7};
8
9#endif /* __ASM_ARCH_PXA930_TRKBALL_H */
10
diff --git a/arch/arm/mach-pxa/include/mach/pxafb.h b/arch/arm/mach-pxa/include/mach/pxafb.h
new file mode 100644
index 00000000000..01a45ac4811
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/pxafb.h
@@ -0,0 +1,162 @@
1/*
2 * arch/arm/mach-pxa/include/mach/pxafb.h
3 *
4 * Support for the xscale frame buffer.
5 *
6 * Author: Jean-Frederic Clere
7 * Created: Sep 22, 2003
8 * Copyright: jfclere@sinix.net
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#include <linux/fb.h>
16#include <mach/regs-lcd.h>
17
18/*
19 * Supported LCD connections
20 *
21 * bits 0 - 3: for LCD panel type:
22 *
23 * STN - for passive matrix
24 * DSTN - for dual scan passive matrix
25 * TFT - for active matrix
26 *
27 * bits 4 - 9 : for bus width
28 * bits 10-17 : for AC Bias Pin Frequency
29 * bit 18 : for output enable polarity
30 * bit 19 : for pixel clock edge
31 * bit 20 : for output pixel format when base is RGBT16
32 */
33#define LCD_CONN_TYPE(_x) ((_x) & 0x0f)
34#define LCD_CONN_WIDTH(_x) (((_x) >> 4) & 0x1f)
35
36#define LCD_TYPE_MASK 0xf
37#define LCD_TYPE_UNKNOWN 0
38#define LCD_TYPE_MONO_STN 1
39#define LCD_TYPE_MONO_DSTN 2
40#define LCD_TYPE_COLOR_STN 3
41#define LCD_TYPE_COLOR_DSTN 4
42#define LCD_TYPE_COLOR_TFT 5
43#define LCD_TYPE_SMART_PANEL 6
44#define LCD_TYPE_MAX 7
45
46#define LCD_MONO_STN_4BPP ((4 << 4) | LCD_TYPE_MONO_STN)
47#define LCD_MONO_STN_8BPP ((8 << 4) | LCD_TYPE_MONO_STN)
48#define LCD_MONO_DSTN_8BPP ((8 << 4) | LCD_TYPE_MONO_DSTN)
49#define LCD_COLOR_STN_8BPP ((8 << 4) | LCD_TYPE_COLOR_STN)
50#define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN)
51#define LCD_COLOR_TFT_8BPP ((8 << 4) | LCD_TYPE_COLOR_TFT)
52#define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT)
53#define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT)
54#define LCD_SMART_PANEL_8BPP ((8 << 4) | LCD_TYPE_SMART_PANEL)
55#define LCD_SMART_PANEL_16BPP ((16 << 4) | LCD_TYPE_SMART_PANEL)
56#define LCD_SMART_PANEL_18BPP ((18 << 4) | LCD_TYPE_SMART_PANEL)
57
58#define LCD_AC_BIAS_FREQ(x) (((x) & 0xff) << 10)
59#define LCD_BIAS_ACTIVE_HIGH (0 << 18)
60#define LCD_BIAS_ACTIVE_LOW (1 << 18)
61#define LCD_PCLK_EDGE_RISE (0 << 19)
62#define LCD_PCLK_EDGE_FALL (1 << 19)
63#define LCD_ALTERNATE_MAPPING (1 << 20)
64
65/*
66 * This structure describes the machine which we are running on.
67 * It is set in linux/arch/arm/mach-pxa/machine_name.c and used in the probe routine
68 * of linux/drivers/video/pxafb.c
69 */
70struct pxafb_mode_info {
71 u_long pixclock;
72
73 u_short xres;
74 u_short yres;
75
76 u_char bpp;
77 u_int cmap_greyscale:1,
78 depth:8,
79 transparency:1,
80 unused:22;
81
82 /* Parallel Mode Timing */
83 u_char hsync_len;
84 u_char left_margin;
85 u_char right_margin;
86
87 u_char vsync_len;
88 u_char upper_margin;
89 u_char lower_margin;
90 u_char sync;
91
92 /* Smart Panel Mode Timing - see PXA27x DM 7.4.15.0.3 for details
93 * Note:
94 * 1. all parameters in nanosecond (ns)
95 * 2. a0cs{rd,wr}_set_hld are controlled by the same register bits
96 * in pxa27x and pxa3xx, initialize them to the same value or
97 * the larger one will be used
98 * 3. same to {rd,wr}_pulse_width
99 *
100 * 4. LCD_PCLK_EDGE_{RISE,FALL} controls the L_PCLK_WR polarity
101 * 5. sync & FB_SYNC_HOR_HIGH_ACT controls the L_LCLK_A0
102 * 6. sync & FB_SYNC_VERT_HIGH_ACT controls the L_LCLK_RD
103 */
104 unsigned a0csrd_set_hld; /* A0 and CS Setup/Hold Time before/after L_FCLK_RD */
105 unsigned a0cswr_set_hld; /* A0 and CS Setup/Hold Time before/after L_PCLK_WR */
106 unsigned wr_pulse_width; /* L_PCLK_WR pulse width */
107 unsigned rd_pulse_width; /* L_FCLK_RD pulse width */
108 unsigned cmd_inh_time; /* Command Inhibit time between two writes */
109 unsigned op_hold_time; /* Output Hold time from L_FCLK_RD negation */
110};
111
112struct pxafb_mach_info {
113 struct pxafb_mode_info *modes;
114 unsigned int num_modes;
115
116 unsigned int lcd_conn;
117 unsigned long video_mem_size;
118
119 u_int fixed_modes:1,
120 cmap_inverse:1,
121 cmap_static:1,
122 acceleration_enabled:1,
123 unused:28;
124
125 /* The following should be defined in LCCR0
126 * LCCR0_Act or LCCR0_Pas Active or Passive
127 * LCCR0_Sngl or LCCR0_Dual Single/Dual panel
128 * LCCR0_Mono or LCCR0_Color Mono/Color
129 * LCCR0_4PixMono or LCCR0_8PixMono (in mono single mode)
130 * LCCR0_DMADel(Tcpu) (optional) DMA request delay
131 *
132 * The following should not be defined in LCCR0:
133 * LCCR0_OUM, LCCR0_BM, LCCR0_QDM, LCCR0_DIS, LCCR0_EFM
134 * LCCR0_IUM, LCCR0_SFM, LCCR0_LDM, LCCR0_ENB
135 */
136 u_int lccr0;
137 /* The following should be defined in LCCR3
138 * LCCR3_OutEnH or LCCR3_OutEnL Output enable polarity
139 * LCCR3_PixRsEdg or LCCR3_PixFlEdg Pixel clock edge type
140 * LCCR3_Acb(X) AB Bias pin frequency
141 * LCCR3_DPC (optional) Double Pixel Clock mode (untested)
142 *
143 * The following should not be defined in LCCR3
144 * LCCR3_HSP, LCCR3_VSP, LCCR0_Pcd(x), LCCR3_Bpp
145 */
146 u_int lccr3;
147 /* The following should be defined in LCCR4
148 * LCCR4_PAL_FOR_0 or LCCR4_PAL_FOR_1 or LCCR4_PAL_FOR_2
149 *
150 * All other bits in LCCR4 should be left alone.
151 */
152 u_int lccr4;
153 void (*pxafb_backlight_power)(int);
154 void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *);
155 void (*smart_update)(struct fb_info *);
156};
157
158void pxa_set_fb_info(struct device *, struct pxafb_mach_info *);
159unsigned long pxafb_get_hsync_time(struct device *dev);
160
161extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int);
162extern int pxafb_smart_flush(struct fb_info *info);
diff --git a/arch/arm/mach-pxa/include/mach/system.h b/arch/arm/mach-pxa/include/mach/system.h
new file mode 100644
index 00000000000..d1fce8b6d10
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/system.h
@@ -0,0 +1,23 @@
1/*
2 * arch/arm/mach-pxa/include/mach/system.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#include <asm/proc-fns.h>
14#include "hardware.h"
15#include "pxa2xx-regs.h"
16
17static inline void arch_idle(void)
18{
19 cpu_do_idle();
20}
21
22
23void arch_reset(char mode, const char *cmd);
diff --git a/arch/arm/mach-pxa/include/mach/vmalloc.h b/arch/arm/mach-pxa/include/mach/vmalloc.h
new file mode 100644
index 00000000000..bfecfbf5f46
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/vmalloc.h
@@ -0,0 +1,11 @@
1/*
2 * arch/arm/mach-pxa/include/mach/vmalloc.h
3 *
4 * Author: Nicolas Pitre
5 * Copyright: (C) 2001 MontaVista Software Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#define VMALLOC_END (0xe8000000UL)
diff --git a/arch/arm/mach-pxa/leds-idp.c b/arch/arm/mach-pxa/leds-idp.c
new file mode 100644
index 00000000000..8b9c17142d5
--- /dev/null
+++ b/arch/arm/mach-pxa/leds-idp.c
@@ -0,0 +1,116 @@
1/*
2 * linux/arch/arm/mach-pxa/leds-idp.c
3 *
4 * Copyright (C) 2000 John Dorsey <john+@cs.cmu.edu>
5 *
6 * Copyright (c) 2001 Jeff Sutherland <jeffs@accelent.com>
7 *
8 * Original (leds-footbridge.c) by Russell King
9 *
10 * Macros for actual LED manipulation should be in machine specific
11 * files in this 'mach' directory.
12 */
13
14
15#include <linux/init.h>
16
17#include <mach/hardware.h>
18#include <asm/leds.h>
19#include <asm/system.h>
20
21#include <mach/pxa25x.h>
22#include <mach/idp.h>
23
24#include "leds.h"
25
26#define LED_STATE_ENABLED 1
27#define LED_STATE_CLAIMED 2
28
29static unsigned int led_state;
30static unsigned int hw_led_state;
31
32void idp_leds_event(led_event_t evt)
33{
34 unsigned long flags;
35
36 local_irq_save(flags);
37
38 switch (evt) {
39 case led_start:
40 hw_led_state = IDP_HB_LED | IDP_BUSY_LED;
41 led_state = LED_STATE_ENABLED;
42 break;
43
44 case led_stop:
45 led_state &= ~LED_STATE_ENABLED;
46 break;
47
48 case led_claim:
49 led_state |= LED_STATE_CLAIMED;
50 hw_led_state = IDP_HB_LED | IDP_BUSY_LED;
51 break;
52
53 case led_release:
54 led_state &= ~LED_STATE_CLAIMED;
55 hw_led_state = IDP_HB_LED | IDP_BUSY_LED;
56 break;
57
58#ifdef CONFIG_LEDS_TIMER
59 case led_timer:
60 if (!(led_state & LED_STATE_CLAIMED))
61 hw_led_state ^= IDP_HB_LED;
62 break;
63#endif
64
65#ifdef CONFIG_LEDS_CPU
66 case led_idle_start:
67 if (!(led_state & LED_STATE_CLAIMED))
68 hw_led_state &= ~IDP_BUSY_LED;
69 break;
70
71 case led_idle_end:
72 if (!(led_state & LED_STATE_CLAIMED))
73 hw_led_state |= IDP_BUSY_LED;
74 break;
75#endif
76
77 case led_halted:
78 break;
79
80 case led_green_on:
81 if (led_state & LED_STATE_CLAIMED)
82 hw_led_state |= IDP_HB_LED;
83 break;
84
85 case led_green_off:
86 if (led_state & LED_STATE_CLAIMED)
87 hw_led_state &= ~IDP_HB_LED;
88 break;
89
90 case led_amber_on:
91 break;
92
93 case led_amber_off:
94 break;
95
96 case led_red_on:
97 if (led_state & LED_STATE_CLAIMED)
98 hw_led_state |= IDP_BUSY_LED;
99 break;
100
101 case led_red_off:
102 if (led_state & LED_STATE_CLAIMED)
103 hw_led_state &= ~IDP_BUSY_LED;
104 break;
105
106 default:
107 break;
108 }
109
110 if (led_state & LED_STATE_ENABLED)
111 IDP_CPLD_LED_CONTROL = ( (IDP_CPLD_LED_CONTROL | IDP_LEDS_MASK) & ~hw_led_state);
112 else
113 IDP_CPLD_LED_CONTROL |= IDP_LEDS_MASK;
114
115 local_irq_restore(flags);
116}
diff --git a/arch/arm/mach-pxa/leds-lubbock.c b/arch/arm/mach-pxa/leds-lubbock.c
new file mode 100644
index 00000000000..e26d5efe196
--- /dev/null
+++ b/arch/arm/mach-pxa/leds-lubbock.c
@@ -0,0 +1,125 @@
1/*
2 * linux/arch/arm/mach-pxa/leds-lubbock.c
3 *
4 * Copyright (C) 2000 John Dorsey <john+@cs.cmu.edu>
5 *
6 * Copyright (c) 2001 Jeff Sutherland <jeffs@accelent.com>
7 *
8 * Original (leds-footbridge.c) by Russell King
9 *
10 * Major surgery on April 2004 by Nicolas Pitre for less global
11 * namespace collision. Mostly adapted the Mainstone version.
12 */
13
14#include <linux/init.h>
15
16#include <mach/hardware.h>
17#include <asm/leds.h>
18#include <asm/system.h>
19#include <mach/pxa25x.h>
20#include <mach/lubbock.h>
21
22#include "leds.h"
23
24/*
25 * 8 discrete leds available for general use:
26 *
27 * Note: bits [15-8] are used to enable/blank the 8 7 segment hex displays
28 * so be sure to not monkey with them here.
29 */
30
31#define D28 (1 << 0)
32#define D27 (1 << 1)
33#define D26 (1 << 2)
34#define D25 (1 << 3)
35#define D24 (1 << 4)
36#define D23 (1 << 5)
37#define D22 (1 << 6)
38#define D21 (1 << 7)
39
40#define LED_STATE_ENABLED 1
41#define LED_STATE_CLAIMED 2
42
43static unsigned int led_state;
44static unsigned int hw_led_state;
45
46void lubbock_leds_event(led_event_t evt)
47{
48 unsigned long flags;
49
50 local_irq_save(flags);
51
52 switch (evt) {
53 case led_start:
54 hw_led_state = 0;
55 led_state = LED_STATE_ENABLED;
56 break;
57
58 case led_stop:
59 led_state &= ~LED_STATE_ENABLED;
60 break;
61
62 case led_claim:
63 led_state |= LED_STATE_CLAIMED;
64 hw_led_state = 0;
65 break;
66
67 case led_release:
68 led_state &= ~LED_STATE_CLAIMED;
69 hw_led_state = 0;
70 break;
71
72#ifdef CONFIG_LEDS_TIMER
73 case led_timer:
74 hw_led_state ^= D26;
75 break;
76#endif
77
78#ifdef CONFIG_LEDS_CPU
79 case led_idle_start:
80 hw_led_state &= ~D27;
81 break;
82
83 case led_idle_end:
84 hw_led_state |= D27;
85 break;
86#endif
87
88 case led_halted:
89 break;
90
91 case led_green_on:
92 hw_led_state |= D21;
93 break;
94
95 case led_green_off:
96 hw_led_state &= ~D21;
97 break;
98
99 case led_amber_on:
100 hw_led_state |= D22;
101 break;
102
103 case led_amber_off:
104 hw_led_state &= ~D22;
105 break;
106
107 case led_red_on:
108 hw_led_state |= D23;
109 break;
110
111 case led_red_off:
112 hw_led_state &= ~D23;
113 break;
114
115 default:
116 break;
117 }
118
119 if (led_state & LED_STATE_ENABLED)
120 LUB_DISC_BLNK_LED = (LUB_DISC_BLNK_LED | 0xff) & ~hw_led_state;
121 else
122 LUB_DISC_BLNK_LED |= 0xff;
123
124 local_irq_restore(flags);
125}
diff --git a/arch/arm/mach-pxa/leds-mainstone.c b/arch/arm/mach-pxa/leds-mainstone.c
new file mode 100644
index 00000000000..db4af5eee8b
--- /dev/null
+++ b/arch/arm/mach-pxa/leds-mainstone.c
@@ -0,0 +1,120 @@
1/*
2 * linux/arch/arm/mach-pxa/leds-mainstone.c
3 *
4 * Author: Nicolas Pitre
5 * Created: Nov 05, 2002
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#include <linux/init.h>
14
15#include <mach/hardware.h>
16#include <asm/leds.h>
17#include <asm/system.h>
18
19#include <mach/pxa27x.h>
20#include <mach/mainstone.h>
21
22#include "leds.h"
23
24
25/* 8 discrete leds available for general use: */
26#define D28 (1 << 0)
27#define D27 (1 << 1)
28#define D26 (1 << 2)
29#define D25 (1 << 3)
30#define D24 (1 << 4)
31#define D23 (1 << 5)
32#define D22 (1 << 6)
33#define D21 (1 << 7)
34
35#define LED_STATE_ENABLED 1
36#define LED_STATE_CLAIMED 2
37
38static unsigned int led_state;
39static unsigned int hw_led_state;
40
41void mainstone_leds_event(led_event_t evt)
42{
43 unsigned long flags;
44
45 local_irq_save(flags);
46
47 switch (evt) {
48 case led_start:
49 hw_led_state = 0;
50 led_state = LED_STATE_ENABLED;
51 break;
52
53 case led_stop:
54 led_state &= ~LED_STATE_ENABLED;
55 break;
56
57 case led_claim:
58 led_state |= LED_STATE_CLAIMED;
59 hw_led_state = 0;
60 break;
61
62 case led_release:
63 led_state &= ~LED_STATE_CLAIMED;
64 hw_led_state = 0;
65 break;
66
67#ifdef CONFIG_LEDS_TIMER
68 case led_timer:
69 hw_led_state ^= D26;
70 break;
71#endif
72
73#ifdef CONFIG_LEDS_CPU
74 case led_idle_start:
75 hw_led_state &= ~D27;
76 break;
77
78 case led_idle_end:
79 hw_led_state |= D27;
80 break;
81#endif
82
83 case led_halted:
84 break;
85
86 case led_green_on:
87 hw_led_state |= D21;
88 break;
89
90 case led_green_off:
91 hw_led_state &= ~D21;
92 break;
93
94 case led_amber_on:
95 hw_led_state |= D22;
96 break;
97
98 case led_amber_off:
99 hw_led_state &= ~D22;
100 break;
101
102 case led_red_on:
103 hw_led_state |= D23;
104 break;
105
106 case led_red_off:
107 hw_led_state &= ~D23;
108 break;
109
110 default:
111 break;
112 }
113
114 if (led_state & LED_STATE_ENABLED)
115 MST_LEDCTRL = (MST_LEDCTRL | 0xff) & ~hw_led_state;
116 else
117 MST_LEDCTRL |= 0xff;
118
119 local_irq_restore(flags);
120}
diff --git a/arch/arm/mach-pxa/leds.c b/arch/arm/mach-pxa/leds.c
new file mode 100644
index 00000000000..bbe4d5f6afa
--- /dev/null
+++ b/arch/arm/mach-pxa/leds.c
@@ -0,0 +1,32 @@
1/*
2 * linux/arch/arm/mach-pxa/leds.c
3 *
4 * xscale LEDs dispatcher
5 *
6 * Copyright (C) 2001 Nicolas Pitre
7 *
8 * Copyright (c) 2001 Jeff Sutherland, Accelent Systems Inc.
9 */
10#include <linux/compiler.h>
11#include <linux/init.h>
12
13#include <asm/leds.h>
14#include <asm/mach-types.h>
15
16#include "leds.h"
17
18static int __init
19pxa_leds_init(void)
20{
21 if (machine_is_lubbock())
22 leds_event = lubbock_leds_event;
23 if (machine_is_mainstone())
24 leds_event = mainstone_leds_event;
25 if (machine_is_pxa_idp())
26 leds_event = idp_leds_event;
27
28 leds_event(led_start);
29 return 0;
30}
31
32core_initcall(pxa_leds_init);
diff --git a/arch/arm/mach-pxa/leds.h b/arch/arm/mach-pxa/leds.h
new file mode 100644
index 00000000000..7f0dfe01345
--- /dev/null
+++ b/arch/arm/mach-pxa/leds.h
@@ -0,0 +1,13 @@
1/*
2 * arch/arm/mach-pxa/leds.h
3 *
4 * Copyright (c) 2001 Jeff Sutherland, Accelent Systems Inc.
5 *
6 * blinky lights for various PXA-based systems:
7 *
8 */
9
10extern void idp_leds_event(led_event_t evt);
11extern void lubbock_leds_event(led_event_t evt);
12extern void mainstone_leds_event(led_event_t evt);
13extern void trizeps4_leds_event(led_event_t evt);
diff --git a/arch/arm/mach-pxa/pxa95x.c b/arch/arm/mach-pxa/pxa95x.c
new file mode 100644
index 00000000000..0ee166b61f8
--- /dev/null
+++ b/arch/arm/mach-pxa/pxa95x.c
@@ -0,0 +1,295 @@
1/*
2 * linux/arch/arm/mach-pxa/pxa95x.c
3 *
4 * code specific to PXA95x aka MGx
5 *
6 * Copyright (C) 2009-2010 Marvell International Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#include <linux/module.h>
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/pm.h>
17#include <linux/platform_device.h>
18#include <linux/i2c/pxa-i2c.h>
19#include <linux/irq.h>
20#include <linux/io.h>
21#include <linux/syscore_ops.h>
22
23#include <mach/hardware.h>
24#include <mach/gpio.h>
25#include <mach/pxa3xx-regs.h>
26#include <mach/pxa930.h>
27#include <mach/reset.h>
28#include <mach/pm.h>
29#include <mach/dma.h>
30
31#include "generic.h"
32#include "devices.h"
33#include "clock.h"
34
35static struct mfp_addr_map pxa95x_mfp_addr_map[] __initdata = {
36
37 MFP_ADDR(GPIO0, 0x02e0),
38 MFP_ADDR(GPIO1, 0x02dc),
39 MFP_ADDR(GPIO2, 0x02e8),
40 MFP_ADDR(GPIO3, 0x02d8),
41 MFP_ADDR(GPIO4, 0x02e4),
42 MFP_ADDR(GPIO5, 0x02ec),
43 MFP_ADDR(GPIO6, 0x02f8),
44 MFP_ADDR(GPIO7, 0x02fc),
45 MFP_ADDR(GPIO8, 0x0300),
46 MFP_ADDR(GPIO9, 0x02d4),
47 MFP_ADDR(GPIO10, 0x02f4),
48 MFP_ADDR(GPIO11, 0x02f0),
49 MFP_ADDR(GPIO12, 0x0304),
50 MFP_ADDR(GPIO13, 0x0310),
51 MFP_ADDR(GPIO14, 0x0308),
52 MFP_ADDR(GPIO15, 0x030c),
53 MFP_ADDR(GPIO16, 0x04e8),
54 MFP_ADDR(GPIO17, 0x04f4),
55 MFP_ADDR(GPIO18, 0x04f8),
56 MFP_ADDR(GPIO19, 0x04fc),
57 MFP_ADDR(GPIO20, 0x0518),
58 MFP_ADDR(GPIO21, 0x051c),
59 MFP_ADDR(GPIO22, 0x04ec),
60 MFP_ADDR(GPIO23, 0x0500),
61 MFP_ADDR(GPIO24, 0x04f0),
62 MFP_ADDR(GPIO25, 0x0504),
63 MFP_ADDR(GPIO26, 0x0510),
64 MFP_ADDR(GPIO27, 0x0514),
65 MFP_ADDR(GPIO28, 0x0520),
66 MFP_ADDR(GPIO29, 0x0600),
67 MFP_ADDR(GPIO30, 0x0618),
68 MFP_ADDR(GPIO31, 0x0610),
69 MFP_ADDR(GPIO32, 0x060c),
70 MFP_ADDR(GPIO33, 0x061c),
71 MFP_ADDR(GPIO34, 0x0620),
72 MFP_ADDR(GPIO35, 0x0628),
73 MFP_ADDR(GPIO36, 0x062c),
74 MFP_ADDR(GPIO37, 0x0630),
75 MFP_ADDR(GPIO38, 0x0634),
76 MFP_ADDR(GPIO39, 0x0638),
77 MFP_ADDR(GPIO40, 0x063c),
78 MFP_ADDR(GPIO41, 0x0614),
79 MFP_ADDR(GPIO42, 0x0624),
80 MFP_ADDR(GPIO43, 0x0608),
81 MFP_ADDR(GPIO44, 0x0604),
82 MFP_ADDR(GPIO45, 0x050c),
83 MFP_ADDR(GPIO46, 0x0508),
84 MFP_ADDR(GPIO47, 0x02bc),
85 MFP_ADDR(GPIO48, 0x02b4),
86 MFP_ADDR(GPIO49, 0x02b8),
87 MFP_ADDR(GPIO50, 0x02c8),
88 MFP_ADDR(GPIO51, 0x02c0),
89 MFP_ADDR(GPIO52, 0x02c4),
90 MFP_ADDR(GPIO53, 0x02d0),
91 MFP_ADDR(GPIO54, 0x02cc),
92 MFP_ADDR(GPIO55, 0x029c),
93 MFP_ADDR(GPIO56, 0x02a0),
94 MFP_ADDR(GPIO57, 0x0294),
95 MFP_ADDR(GPIO58, 0x0298),
96 MFP_ADDR(GPIO59, 0x02a4),
97 MFP_ADDR(GPIO60, 0x02a8),
98 MFP_ADDR(GPIO61, 0x02b0),
99 MFP_ADDR(GPIO62, 0x02ac),
100 MFP_ADDR(GPIO63, 0x0640),
101 MFP_ADDR(GPIO64, 0x065c),
102 MFP_ADDR(GPIO65, 0x0648),
103 MFP_ADDR(GPIO66, 0x0644),
104 MFP_ADDR(GPIO67, 0x0674),
105 MFP_ADDR(GPIO68, 0x0658),
106 MFP_ADDR(GPIO69, 0x0654),
107 MFP_ADDR(GPIO70, 0x0660),
108 MFP_ADDR(GPIO71, 0x0668),
109 MFP_ADDR(GPIO72, 0x0664),
110 MFP_ADDR(GPIO73, 0x0650),
111 MFP_ADDR(GPIO74, 0x066c),
112 MFP_ADDR(GPIO75, 0x064c),
113 MFP_ADDR(GPIO76, 0x0670),
114 MFP_ADDR(GPIO77, 0x0678),
115 MFP_ADDR(GPIO78, 0x067c),
116 MFP_ADDR(GPIO79, 0x0694),
117 MFP_ADDR(GPIO80, 0x069c),
118 MFP_ADDR(GPIO81, 0x06a0),
119 MFP_ADDR(GPIO82, 0x06a4),
120 MFP_ADDR(GPIO83, 0x0698),
121 MFP_ADDR(GPIO84, 0x06bc),
122 MFP_ADDR(GPIO85, 0x06b4),
123 MFP_ADDR(GPIO86, 0x06b0),
124 MFP_ADDR(GPIO87, 0x06c0),
125 MFP_ADDR(GPIO88, 0x06c4),
126 MFP_ADDR(GPIO89, 0x06ac),
127 MFP_ADDR(GPIO90, 0x0680),
128 MFP_ADDR(GPIO91, 0x0684),
129 MFP_ADDR(GPIO92, 0x0688),
130 MFP_ADDR(GPIO93, 0x0690),
131 MFP_ADDR(GPIO94, 0x068c),
132 MFP_ADDR(GPIO95, 0x06a8),
133 MFP_ADDR(GPIO96, 0x06b8),
134 MFP_ADDR(GPIO97, 0x0410),
135 MFP_ADDR(GPIO98, 0x0418),
136 MFP_ADDR(GPIO99, 0x041c),
137 MFP_ADDR(GPIO100, 0x0414),
138 MFP_ADDR(GPIO101, 0x0408),
139 MFP_ADDR(GPIO102, 0x0324),
140 MFP_ADDR(GPIO103, 0x040c),
141 MFP_ADDR(GPIO104, 0x0400),
142 MFP_ADDR(GPIO105, 0x0328),
143 MFP_ADDR(GPIO106, 0x0404),
144
145 MFP_ADDR(GPIO159, 0x0524),
146 MFP_ADDR(GPIO163, 0x0534),
147 MFP_ADDR(GPIO167, 0x0544),
148 MFP_ADDR(GPIO168, 0x0548),
149 MFP_ADDR(GPIO169, 0x054c),
150 MFP_ADDR(GPIO170, 0x0550),
151 MFP_ADDR(GPIO171, 0x0554),
152 MFP_ADDR(GPIO172, 0x0558),
153 MFP_ADDR(GPIO173, 0x055c),
154
155 MFP_ADDR(nXCVREN, 0x0204),
156 MFP_ADDR(DF_CLE_nOE, 0x020c),
157 MFP_ADDR(DF_nADV1_ALE, 0x0218),
158 MFP_ADDR(DF_SCLK_E, 0x0214),
159 MFP_ADDR(DF_SCLK_S, 0x0210),
160 MFP_ADDR(nBE0, 0x021c),
161 MFP_ADDR(nBE1, 0x0220),
162 MFP_ADDR(DF_nADV2_ALE, 0x0224),
163 MFP_ADDR(DF_INT_RnB, 0x0228),
164 MFP_ADDR(DF_nCS0, 0x022c),
165 MFP_ADDR(DF_nCS1, 0x0230),
166 MFP_ADDR(nLUA, 0x0254),
167 MFP_ADDR(nLLA, 0x0258),
168 MFP_ADDR(DF_nWE, 0x0234),
169 MFP_ADDR(DF_nRE_nOE, 0x0238),
170 MFP_ADDR(DF_ADDR0, 0x024c),
171 MFP_ADDR(DF_ADDR1, 0x0250),
172 MFP_ADDR(DF_ADDR2, 0x025c),
173 MFP_ADDR(DF_ADDR3, 0x0260),
174 MFP_ADDR(DF_IO0, 0x023c),
175 MFP_ADDR(DF_IO1, 0x0240),
176 MFP_ADDR(DF_IO2, 0x0244),
177 MFP_ADDR(DF_IO3, 0x0248),
178 MFP_ADDR(DF_IO4, 0x0264),
179 MFP_ADDR(DF_IO5, 0x0268),
180 MFP_ADDR(DF_IO6, 0x026c),
181 MFP_ADDR(DF_IO7, 0x0270),
182 MFP_ADDR(DF_IO8, 0x0274),
183 MFP_ADDR(DF_IO9, 0x0278),
184 MFP_ADDR(DF_IO10, 0x027c),
185 MFP_ADDR(DF_IO11, 0x0280),
186 MFP_ADDR(DF_IO12, 0x0284),
187 MFP_ADDR(DF_IO13, 0x0288),
188 MFP_ADDR(DF_IO14, 0x028c),
189 MFP_ADDR(DF_IO15, 0x0290),
190
191 MFP_ADDR(GSIM_UIO, 0x0314),
192 MFP_ADDR(GSIM_UCLK, 0x0318),
193 MFP_ADDR(GSIM_UDET, 0x031c),
194 MFP_ADDR(GSIM_nURST, 0x0320),
195
196 MFP_ADDR(PMIC_INT, 0x06c8),
197
198 MFP_ADDR(RDY, 0x0200),
199
200 MFP_ADDR_END,
201};
202
203static DEFINE_CK(pxa95x_lcd, LCD, &clk_pxa3xx_hsio_ops);
204static DEFINE_CLK(pxa95x_pout, &clk_pxa3xx_pout_ops, 13000000, 70);
205static DEFINE_PXA3_CKEN(pxa95x_ffuart, FFUART, 14857000, 1);
206static DEFINE_PXA3_CKEN(pxa95x_btuart, BTUART, 14857000, 1);
207static DEFINE_PXA3_CKEN(pxa95x_stuart, STUART, 14857000, 1);
208static DEFINE_PXA3_CKEN(pxa95x_i2c, I2C, 32842000, 0);
209static DEFINE_PXA3_CKEN(pxa95x_keypad, KEYPAD, 32768, 0);
210static DEFINE_PXA3_CKEN(pxa95x_ssp1, SSP1, 13000000, 0);
211static DEFINE_PXA3_CKEN(pxa95x_ssp2, SSP2, 13000000, 0);
212static DEFINE_PXA3_CKEN(pxa95x_ssp3, SSP3, 13000000, 0);
213static DEFINE_PXA3_CKEN(pxa95x_ssp4, SSP4, 13000000, 0);
214static DEFINE_PXA3_CKEN(pxa95x_pwm0, PWM0, 13000000, 0);
215static DEFINE_PXA3_CKEN(pxa95x_pwm1, PWM1, 13000000, 0);
216
217static struct clk_lookup pxa95x_clkregs[] = {
218 INIT_CLKREG(&clk_pxa95x_pout, NULL, "CLK_POUT"),
219 /* Power I2C clock is always on */
220 INIT_CLKREG(&clk_dummy, "pxa3xx-pwri2c.1", NULL),
221 INIT_CLKREG(&clk_pxa95x_lcd, "pxa2xx-fb", NULL),
222 INIT_CLKREG(&clk_pxa95x_ffuart, "pxa2xx-uart.0", NULL),
223 INIT_CLKREG(&clk_pxa95x_btuart, "pxa2xx-uart.1", NULL),
224 INIT_CLKREG(&clk_pxa95x_stuart, "pxa2xx-uart.2", NULL),
225 INIT_CLKREG(&clk_pxa95x_stuart, "pxa2xx-ir", "UARTCLK"),
226 INIT_CLKREG(&clk_pxa95x_i2c, "pxa2xx-i2c.0", NULL),
227 INIT_CLKREG(&clk_pxa95x_keypad, "pxa27x-keypad", NULL),
228 INIT_CLKREG(&clk_pxa95x_ssp1, "pxa27x-ssp.0", NULL),
229 INIT_CLKREG(&clk_pxa95x_ssp2, "pxa27x-ssp.1", NULL),
230 INIT_CLKREG(&clk_pxa95x_ssp3, "pxa27x-ssp.2", NULL),
231 INIT_CLKREG(&clk_pxa95x_ssp4, "pxa27x-ssp.3", NULL),
232 INIT_CLKREG(&clk_pxa95x_pwm0, "pxa27x-pwm.0", NULL),
233 INIT_CLKREG(&clk_pxa95x_pwm1, "pxa27x-pwm.1", NULL),
234};
235
236void __init pxa95x_init_irq(void)
237{
238 pxa_init_irq(96, NULL);
239 pxa_init_gpio(IRQ_GPIO_2_x, 2, 127, NULL);
240}
241
242/*
243 * device registration specific to PXA93x.
244 */
245
246void __init pxa95x_set_i2c_power_info(struct i2c_pxa_platform_data *info)
247{
248 pxa_register_device(&pxa3xx_device_i2c_power, info);
249}
250
251static struct platform_device *devices[] __initdata = {
252 &sa1100_device_rtc,
253 &pxa_device_rtc,
254 &pxa27x_device_ssp1,
255 &pxa27x_device_ssp2,
256 &pxa27x_device_ssp3,
257 &pxa3xx_device_ssp4,
258 &pxa27x_device_pwm0,
259 &pxa27x_device_pwm1,
260};
261
262static int __init pxa95x_init(void)
263{
264 int ret = 0, i;
265
266 if (cpu_is_pxa95x()) {
267 mfp_init_base(io_p2v(MFPR_BASE));
268 mfp_init_addr(pxa95x_mfp_addr_map);
269
270 reset_status = ARSR;
271
272 /*
273 * clear RDH bit every time after reset
274 *
275 * Note: the last 3 bits DxS are write-1-to-clear so carefully
276 * preserve them here in case they will be referenced later
277 */
278 ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S);
279
280 clkdev_add_table(pxa95x_clkregs, ARRAY_SIZE(pxa95x_clkregs));
281
282 if ((ret = pxa_init_dma(IRQ_DMA, 32)))
283 return ret;
284
285 register_syscore_ops(&pxa_irq_syscore_ops);
286 register_syscore_ops(&pxa_gpio_syscore_ops);
287 register_syscore_ops(&pxa3xx_clock_syscore_ops);
288
289 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
290 }
291
292 return ret;
293}
294
295postcore_initcall(pxa95x_init);
diff --git a/arch/arm/mach-pxa/saarb.c b/arch/arm/mach-pxa/saarb.c
new file mode 100644
index 00000000000..ebd6379c496
--- /dev/null
+++ b/arch/arm/mach-pxa/saarb.c
@@ -0,0 +1,114 @@
1/*
2 * linux/arch/arm/mach-pxa/saarb.c
3 *
4 * Support for the Marvell Handheld Platform (aka SAARB)
5 *
6 * Copyright (C) 2007-2010 Marvell International Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * publishhed by the Free Software Foundation.
11 */
12
13#include <linux/init.h>
14#include <linux/kernel.h>
15#include <linux/i2c.h>
16#include <linux/i2c/pxa-i2c.h>
17#include <linux/mfd/88pm860x.h>
18
19#include <asm/mach-types.h>
20#include <asm/mach/arch.h>
21
22#include <mach/irqs.h>
23#include <mach/hardware.h>
24#include <mach/mfp.h>
25#include <mach/mfp-pxa930.h>
26#include <mach/gpio.h>
27
28#include "generic.h"
29
30#define SAARB_NR_IRQS (IRQ_BOARD_START + 40)
31
32static struct pm860x_touch_pdata saarb_touch = {
33 .gpadc_prebias = 1,
34 .slot_cycle = 1,
35 .tsi_prebias = 6,
36 .pen_prebias = 16,
37 .pen_prechg = 2,
38 .res_x = 300,
39};
40
41static struct pm860x_backlight_pdata saarb_backlight[] = {
42 {
43 .id = PM8606_ID_BACKLIGHT,
44 .iset = PM8606_WLED_CURRENT(24),
45 .flags = PM8606_BACKLIGHT1,
46 },
47 {},
48};
49
50static struct pm860x_led_pdata saarb_led[] = {
51 {
52 .id = PM8606_ID_LED,
53 .iset = PM8606_LED_CURRENT(12),
54 .flags = PM8606_LED1_RED,
55 }, {
56 .id = PM8606_ID_LED,
57 .iset = PM8606_LED_CURRENT(12),
58 .flags = PM8606_LED1_GREEN,
59 }, {
60 .id = PM8606_ID_LED,
61 .iset = PM8606_LED_CURRENT(12),
62 .flags = PM8606_LED1_BLUE,
63 }, {
64 .id = PM8606_ID_LED,
65 .iset = PM8606_LED_CURRENT(12),
66 .flags = PM8606_LED2_RED,
67 }, {
68 .id = PM8606_ID_LED,
69 .iset = PM8606_LED_CURRENT(12),
70 .flags = PM8606_LED2_GREEN,
71 }, {
72 .id = PM8606_ID_LED,
73 .iset = PM8606_LED_CURRENT(12),
74 .flags = PM8606_LED2_BLUE,
75 },
76};
77
78static struct pm860x_platform_data saarb_pm8607_info = {
79 .touch = &saarb_touch,
80 .backlight = &saarb_backlight[0],
81 .led = &saarb_led[0],
82 .companion_addr = 0x10,
83 .irq_mode = 0,
84 .irq_base = IRQ_BOARD_START,
85
86 .i2c_port = GI2C_PORT,
87};
88
89static struct i2c_board_info saarb_i2c_info[] = {
90 {
91 .type = "88PM860x",
92 .addr = 0x34,
93 .platform_data = &saarb_pm8607_info,
94 .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO83)),
95 },
96};
97
98static void __init saarb_init(void)
99{
100 pxa_set_ffuart_info(NULL);
101 pxa_set_i2c_info(NULL);
102 i2c_register_board_info(0, ARRAY_AND_SIZE(saarb_i2c_info));
103}
104
105MACHINE_START(SAARB, "PXA955 Handheld Platform (aka SAARB)")
106 .boot_params = 0xa0000100,
107 .map_io = pxa3xx_map_io,
108 .nr_irqs = SAARB_NR_IRQS,
109 .init_irq = pxa95x_init_irq,
110 .handle_irq = pxa3xx_handle_irq,
111 .timer = &pxa_timer,
112 .init_machine = saarb_init,
113MACHINE_END
114
diff --git a/arch/arm/mach-pxa/tavorevb3.c b/arch/arm/mach-pxa/tavorevb3.c
new file mode 100644
index 00000000000..fd5a8eae0a8
--- /dev/null
+++ b/arch/arm/mach-pxa/tavorevb3.c
@@ -0,0 +1,135 @@
1/*
2 * linux/arch/arm/mach-pxa/tavorevb3.c
3 *
4 * Support for the Marvell EVB3 Development Platform.
5 *
6 * Copyright: (C) Copyright 2008-2010 Marvell International Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * publishhed by the Free Software Foundation.
11 */
12
13#include <linux/init.h>
14#include <linux/kernel.h>
15#include <linux/platform_device.h>
16#include <linux/interrupt.h>
17#include <linux/i2c.h>
18#include <linux/i2c/pxa-i2c.h>
19#include <linux/gpio.h>
20#include <linux/mfd/88pm860x.h>
21
22#include <asm/mach-types.h>
23#include <asm/mach/arch.h>
24
25#include <mach/pxa930.h>
26
27#include "devices.h"
28#include "generic.h"
29
30#define TAVOREVB3_NR_IRQS (IRQ_BOARD_START + 24)
31
32static mfp_cfg_t evb3_mfp_cfg[] __initdata = {
33 /* UART */
34 GPIO53_UART1_TXD,
35 GPIO54_UART1_RXD,
36
37 /* PMIC */
38 PMIC_INT_GPIO83,
39};
40
41#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
42static struct pm860x_touch_pdata evb3_touch = {
43 .gpadc_prebias = 1,
44 .slot_cycle = 1,
45 .tsi_prebias = 6,
46 .pen_prebias = 16,
47 .pen_prechg = 2,
48 .res_x = 300,
49};
50
51static struct pm860x_backlight_pdata evb3_backlight[] = {
52 {
53 .id = PM8606_ID_BACKLIGHT,
54 .iset = PM8606_WLED_CURRENT(24),
55 .flags = PM8606_BACKLIGHT1,
56 },
57 {},
58};
59
60static struct pm860x_led_pdata evb3_led[] = {
61 {
62 .id = PM8606_ID_LED,
63 .iset = PM8606_LED_CURRENT(12),
64 .flags = PM8606_LED1_RED,
65 }, {
66 .id = PM8606_ID_LED,
67 .iset = PM8606_LED_CURRENT(12),
68 .flags = PM8606_LED1_GREEN,
69 }, {
70 .id = PM8606_ID_LED,
71 .iset = PM8606_LED_CURRENT(12),
72 .flags = PM8606_LED1_BLUE,
73 }, {
74 .id = PM8606_ID_LED,
75 .iset = PM8606_LED_CURRENT(12),
76 .flags = PM8606_LED2_RED,
77 }, {
78 .id = PM8606_ID_LED,
79 .iset = PM8606_LED_CURRENT(12),
80 .flags = PM8606_LED2_GREEN,
81 }, {
82 .id = PM8606_ID_LED,
83 .iset = PM8606_LED_CURRENT(12),
84 .flags = PM8606_LED2_BLUE,
85 },
86};
87
88static struct pm860x_platform_data evb3_pm8607_info = {
89 .touch = &evb3_touch,
90 .backlight = &evb3_backlight[0],
91 .led = &evb3_led[0],
92 .companion_addr = 0x10,
93 .irq_mode = 0,
94 .irq_base = IRQ_BOARD_START,
95
96 .i2c_port = GI2C_PORT,
97};
98
99static struct i2c_board_info evb3_i2c_info[] = {
100 {
101 .type = "88PM860x",
102 .addr = 0x34,
103 .platform_data = &evb3_pm8607_info,
104 .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO83)),
105 },
106};
107
108static void __init evb3_init_i2c(void)
109{
110 pxa_set_i2c_info(NULL);
111 i2c_register_board_info(0, ARRAY_AND_SIZE(evb3_i2c_info));
112}
113#else
114static inline void evb3_init_i2c(void) {}
115#endif
116
117static void __init evb3_init(void)
118{
119 /* initialize MFP configurations */
120 pxa3xx_mfp_config(ARRAY_AND_SIZE(evb3_mfp_cfg));
121
122 pxa_set_ffuart_info(NULL);
123
124 evb3_init_i2c();
125}
126
127MACHINE_START(TAVOREVB3, "PXA950 Evaluation Board (aka TavorEVB3)")
128 .boot_params = 0xa0000100,
129 .map_io = pxa3xx_map_io,
130 .nr_irqs = TAVOREVB3_NR_IRQS,
131 .init_irq = pxa3xx_init_irq,
132 .handle_irq = pxa3xx_handle_irq,
133 .timer = &pxa_timer,
134 .init_machine = evb3_init,
135MACHINE_END