Commit 6c7a027f authored by Jeff Sutherland's avatar Jeff Sutherland Committed by Russell King

[ARM PATCH] 1238/1: Accelent PXA IDP config cleanups

This patch brings support for the PXA-IDP up to 2.5.30, plus adds
support in head.S for low level serial debugging support.
parent ea1432c7
...@@ -40,6 +40,14 @@ ...@@ -40,6 +40,14 @@
.macro writeb, rb .macro writeb, rb
strb \rb, [r3, #0] strb \rb, [r3, #0]
.endm .endm
#elif defined(CONFIG_ARCH_PXA) /* Xscale-type */
.macro loadsp, rb
mov \rb, #0x40000000
orr \rb, \rb, #0x00100000
.endm
.macro writeb, rb
strb \rb, [r3, #0]
.endm
#else #else
#error no serial architecture defined #error no serial architecture defined
#endif #endif
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
* *
* 2001-09-13: Cliff Brake <cbrake@accelent.com> * 2001-09-13: Cliff Brake <cbrake@accelent.com>
* Initial code * Initial code
*
* Expected command line: mem=32M initrd=0xa1000000,4M root=/dev/ram ramdisk=8192
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -29,8 +31,6 @@ ...@@ -29,8 +31,6 @@
#include "generic.h" #include "generic.h"
#define PXA_IDP_REV02
#ifndef PXA_IDP_REV02 #ifndef PXA_IDP_REV02
/* shadow registers for write only registers */ /* shadow registers for write only registers */
unsigned int idp_cpld_led_control_shadow = 0x1; unsigned int idp_cpld_led_control_shadow = 0x1;
...@@ -103,9 +103,19 @@ static void __init idp_map_io(void) ...@@ -103,9 +103,19 @@ static void __init idp_map_io(void)
pxa_map_io(); pxa_map_io();
iotable_init(idp_io_desc, ARRAY_SIZE(idp_io_desc)); iotable_init(idp_io_desc, ARRAY_SIZE(idp_io_desc));
set_GPIO_IRQ_edge(IRQ_TO_GPIO_2_80(TOUCH_PANEL_IRQ), TOUCH_PANEL_IRQ_EDGE); set_irq_type(IRQ_TO_GPIO_2_80(TOUCH_PANEL_IRQ), TOUCH_PANEL_IRQ_EDGE);
// serial ports 2 & 3
pxa_gpio_mode(GPIO42_BTRXD_MD);
pxa_gpio_mode(GPIO43_BTTXD_MD);
pxa_gpio_mode(GPIO44_BTCTS_MD);
pxa_gpio_mode(GPIO45_BTRTS_MD);
pxa_gpio_mode(GPIO46_STRXD_MD);
pxa_gpio_mode(GPIO47_STTXD_MD);
} }
MACHINE_START(PXA_IDP, "Accelent Xscale IDP") MACHINE_START(PXA_IDP, "Accelent Xscale IDP")
MAINTAINER("Accelent Systems Inc.") MAINTAINER("Accelent Systems Inc.")
BOOT_MEM(0xa0000000, 0x40000000, 0xfc000000) BOOT_MEM(0xa0000000, 0x40000000, 0xfc000000)
......
...@@ -19,9 +19,10 @@ ...@@ -19,9 +19,10 @@
/* comment out following if you have a rev01 board */ /* comment out following if you have a rev01 board */
#define PXA_IDP_REV02 1 #define PXA_IDP_REV02 1
//#undef PXA_IDP_REV02
#ifdef PXA_IDP_REV02 #ifdef PXA_IDP_REV02
//Use this as well for 0017-x004 and greater pcb's:
#define PXA_IDP_REV04 1
#define IDP_FLASH_PHYS (PXA_CS0_PHYS) #define IDP_FLASH_PHYS (PXA_CS0_PHYS)
#define IDP_ALT_FLASH_PHYS (PXA_CS1_PHYS) #define IDP_ALT_FLASH_PHYS (PXA_CS1_PHYS)
...@@ -38,6 +39,7 @@ ...@@ -38,6 +39,7 @@
#define IDP_IDE_BASE (0xf0000000) #define IDP_IDE_BASE (0xf0000000)
#define IDP_IDE_SIZE (1*1024*1024) #define IDP_IDE_SIZE (1*1024*1024)
#define IDE_REG_STRIDE 4
#define IDP_ETH_BASE (IDP_IDE_BASE + IDP_IDE_SIZE) #define IDP_ETH_BASE (IDP_IDE_BASE + IDP_IDE_SIZE)
#define IDP_ETH_SIZE (1*1024*1024) #define IDP_ETH_SIZE (1*1024*1024)
...@@ -111,6 +113,33 @@ ...@@ -111,6 +113,33 @@
* Bit masks for various registers * Bit masks for various registers
*/ */
// IDP_CPLD_PCCARD_PWR
#define PCC0_PWR0 (1 << 0)
#define PCC0_PWR1 (1 << 1)
#define PCC0_PWR2 (1 << 2)
#define PCC0_PWR3 (1 << 3)
#define PCC1_PWR0 (1 << 4)
#define PCC1_PWR1 (1 << 5)
#define PCC1_PWR2 (1 << 6)
#define PCC1_PWR3 (1 << 7)
// IDP_CPLD_PCCARD_EN
#define PCC0_RESET (1 << 6)
#define PCC1_RESET (1 << 7)
#define PCC0_ENABLE (1 << 0)
#define PCC1_ENABLE (1 << 1)
// IDP_CPLD_PCCARDx_STATUS
#define _PCC_WRPROT (1 << 7) // 7-4 read as low true
#define _PCC_RESET (1 << 6)
#define _PCC_IRQ (1 << 5)
#define _PCC_INPACK (1 << 4)
#define PCC_BVD2 (1 << 3)
#define PCC_BVD1 (1 << 2)
#define PCC_VS2 (1 << 1)
#define PCC_VS1 (1 << 0)
#define PCC_DETECT(x) (GPLR(7 + (x)) & GPIO_bit(7 + (x)))
/* /*
* Macros for LCD Driver * Macros for LCD Driver
...@@ -129,6 +158,32 @@ ...@@ -129,6 +158,32 @@
#endif #endif
/* A listing of interrupts used by external hardware devices */
#ifdef PXA_IDP_REV04
#define TOUCH_PANEL_IRQ IRQ_GPIO(5)
#define IDE_IRQ IRQ_GPIO(21)
#else
#define TOUCH_PANEL_IRQ IRQ_GPIO(21)
#define IDE_IRQ IRQ_GPIO(5)
#endif
#define TOUCH_PANEL_IRQ_EDGE IRQT_FALLING
#define ETHERNET_IRQ IRQ_GPIO(4)
#define ETHERNET_IRQ_EDGE IRQT_RISING
#define IDE_IRQ_EDGE IRQT_RISING
#define PCMCIA_S0_CD_VALID IRQ_GPIO(7)
#define PCMCIA_S0_CD_VALID_EDGE IRQT_BOTHEDGE
#define PCMCIA_S1_CD_VALID IRQ_GPIO(8)
#define PCMCIA_S1_CD_VALID_EDGE IRQT_BOTHEDGE
#define PCMCIA_S0_RDYINT IRQ_GPIO(19)
#define PCMCIA_S1_RDYINT IRQ_GPIO(22)
/* /*
* Macros for LED Driver * Macros for LED Driver
...@@ -173,14 +228,6 @@ ...@@ -173,14 +228,6 @@
inputs = (IDP_CPLD_KB_ROW & 0x7f);\ inputs = (IDP_CPLD_KB_ROW & 0x7f);\
} }
/* A listing of interrupts used by external hardware devices */
#define TOUCH_PANEL_IRQ IRQ_GPIO(21)
#define TOUCH_PANEL_IRQ_EGDE GPIO_FALLING_EDGE
#define ETHERNET_IRQ IRQ_GPIO(4)
#define ETHERNET_IRQ_EDGE GPIO_RISING_EDGE
#else #else
/* /*
...@@ -286,7 +333,7 @@ extern unsigned int idp_control_port_shadow; ...@@ -286,7 +333,7 @@ extern unsigned int idp_control_port_shadow;
#define WRITE_IDP_CPLD_LED_CONTROL(value, mask) \ #define WRITE_IDP_CPLD_LED_CONTROL(value, mask) \
{\ {\
idp_cpld_led_control_shadow = ((value & mask) | (idp_cpld_led_control_shadow & ~mask));\ idp_cpld_led_control_shadow = (((value & mask) | (idp_cpld_led_control_shadow & ~mask)));\
IDP_CPLD_LED_CONTROL = idp_cpld_led_control_shadow;\ IDP_CPLD_LED_CONTROL = idp_cpld_led_control_shadow;\
} }
#define WRITE_IDP_CPLD_PERIPH_PWR(value, mask) \ #define WRITE_IDP_CPLD_PERIPH_PWR(value, mask) \
...@@ -346,10 +393,10 @@ extern unsigned int idp_control_port_shadow; ...@@ -346,10 +393,10 @@ extern unsigned int idp_control_port_shadow;
/* A listing of interrupts used by external hardware devices */ /* A listing of interrupts used by external hardware devices */
#define TOUCH_PANEL_IRQ IRQ_GPIO(21) #define TOUCH_PANEL_IRQ IRQ_GPIO(21)
#define TOUCH_PANEL_IRQ_EGDE GPIO_FALLING_EDGE #define TOUCH_PANEL_IRQ_EGDE IRQT_FALLING
#define ETHERNET_IRQ IRQ_GPIO(4) #define ETHERNET_IRQ IRQ_GPIO(4)
#define ETHERNET_IRQ_EDGE GPIO_RISING_EDGE #define ETHERNET_IRQ_EDGE IRQT_RISING
/* /*
* Bit masks for various registers * Bit masks for various registers
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment