Commit 5b0e59c8 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 978b7ac2 f1d26c92
This diff is collapsed.
......@@ -113,7 +113,7 @@ static void __init idp_map_io(void)
MACHINE_START(PXA_IDP, "Accelent Xscale IDP")
MAINTAINER("Accelent Systems Inc.")
BOOT_MEM(0xa0000000, 0x40000000, 0xfc000000)
BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
MAPIO(idp_map_io)
INITIRQ(idp_init_irq)
INIT_MACHINE(idp_init)
......
......@@ -7,12 +7,10 @@
*
* Original (leds-footbridge.c) by Russell King
*
* See leds.h for bit definitions. The first version defines D28 on the
* Lubbock dev board as the heartbeat, and D27 as the Sys_busy led.
* There's plenty more if you're interested in adding them :)
* Major surgery on April 2004 by Nicolas Pitre for less global
* namespace collision. Mostly adapted the Mainstone version.
*/
#include <linux/config.h>
#include <linux/init.h>
......@@ -22,6 +20,21 @@
#include "leds.h"
/*
* 8 discrete leds available for general use:
*
* Note: bits [15-8] are used to enable/blank the 8 7 segment hex displays
* so be sure to not monkey with them here.
*/
#define D28 (1 << 0)
#define D27 (1 << 1)
#define D26 (1 << 2)
#define D25 (1 << 3)
#define D24 (1 << 4)
#define D23 (1 << 5)
#define D22 (1 << 6)
#define D21 (1 << 7)
#define LED_STATE_ENABLED 1
#define LED_STATE_CLAIMED 2
......@@ -37,7 +50,7 @@ void lubbock_leds_event(led_event_t evt)
switch (evt) {
case led_start:
hw_led_state = HEARTBEAT_LED | SYS_BUSY_LED;
hw_led_state = 0;
led_state = LED_STATE_ENABLED;
break;
......@@ -47,30 +60,27 @@ void lubbock_leds_event(led_event_t evt)
case led_claim:
led_state |= LED_STATE_CLAIMED;
hw_led_state = HEARTBEAT_LED | SYS_BUSY_LED;
hw_led_state = 0;
break;
case led_release:
led_state &= ~LED_STATE_CLAIMED;
hw_led_state = HEARTBEAT_LED | SYS_BUSY_LED;
hw_led_state = 0;
break;
#ifdef CONFIG_LEDS_TIMER
case led_timer:
if (!(led_state & LED_STATE_CLAIMED))
hw_led_state ^= HEARTBEAT_LED;
hw_led_state ^= D26;
break;
#endif
#ifdef CONFIG_LEDS_CPU
case led_idle_start:
if (!(led_state & LED_STATE_CLAIMED))
hw_led_state |= SYS_BUSY_LED;
hw_led_state &= ~D27;
break;
case led_idle_end:
if (!(led_state & LED_STATE_CLAIMED))
hw_led_state &= ~SYS_BUSY_LED;
hw_led_state |= D27;
break;
#endif
......@@ -78,29 +88,27 @@ void lubbock_leds_event(led_event_t evt)
break;
case led_green_on:
if (led_state & LED_STATE_CLAIMED)
hw_led_state &= ~HEARTBEAT_LED;
hw_led_state |= D21;;
break;
case led_green_off:
if (led_state & LED_STATE_CLAIMED)
hw_led_state |= HEARTBEAT_LED;
hw_led_state &= ~D21;
break;
case led_amber_on:
hw_led_state |= D22;;
break;
case led_amber_off:
hw_led_state &= ~D22;
break;
case led_red_on:
if (led_state & LED_STATE_CLAIMED)
hw_led_state &= ~SYS_BUSY_LED;
hw_led_state |= D23;;
break;
case led_red_off:
if (led_state & LED_STATE_CLAIMED)
hw_led_state |= SYS_BUSY_LED;
hw_led_state &= ~D23;
break;
default:
......@@ -108,27 +116,9 @@ void lubbock_leds_event(led_event_t evt)
}
if (led_state & LED_STATE_ENABLED)
{
switch (hw_led_state) {
case 0: // all on
HEARTBEAT_LED_ON;
SYS_BUSY_LED_ON;
break;
case 1: // turn off heartbeat, status on:
HEARTBEAT_LED_OFF;
SYS_BUSY_LED_ON;
break;
case 2: // status off, heartbeat on:
HEARTBEAT_LED_ON;
SYS_BUSY_LED_OFF;
break;
case 3: // turn them both off...
HEARTBEAT_LED_OFF;
SYS_BUSY_LED_OFF;
break;
default:
break;
}
}
LUB_DISC_BLNK_LED = (LUB_DISC_BLNK_LED | 0xff) & ~hw_led_state;
else
LUB_DISC_BLNK_LED |= 0xff;
local_irq_restore(flags);
}
......@@ -28,7 +28,6 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <asm/arch/irq.h>
#include <asm/arch/udc.h>
#include <asm/hardware/sa1111.h>
......@@ -156,11 +155,7 @@ static void __init lubbock_init(void)
}
static struct map_desc lubbock_io_desc[] __initdata = {
/* virtual physical length type */
{ 0xf0000000, 0x08000000, 0x00100000, MT_DEVICE }, /* CPLD */
{ 0xf1000000, 0x0c000000, 0x00100000, MT_DEVICE }, /* LAN91C96 IO */
{ 0xf1100000, 0x0e000000, 0x00100000, MT_DEVICE }, /* LAN91C96 Attr */
{ 0xf4000000, 0x10000000, 0x00800000, MT_DEVICE }, /* SA1111 */
{ LUBBOCK_FPGA_VIRT, LUBBOCK_FPGA_PHYS, 0x00100000, MT_DEVICE }, /* CPLD */
};
static void __init lubbock_map_io(void)
......@@ -169,7 +164,6 @@ static void __init lubbock_map_io(void)
iotable_init(lubbock_io_desc, ARRAY_SIZE(lubbock_io_desc));
/* This enables the BTUART */
CKEN |= CKEN7_BTUART;
pxa_gpio_mode(GPIO42_BTRXD_MD);
pxa_gpio_mode(GPIO43_BTTXD_MD);
pxa_gpio_mode(GPIO44_BTCTS_MD);
......@@ -188,7 +182,7 @@ static void __init lubbock_map_io(void)
PCFR |= PCFR_OPDE;
}
MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform")
MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)")
MAINTAINER("MontaVista Software Inc.")
BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
MAPIO(lubbock_map_io)
......
......@@ -647,6 +647,16 @@ cpu_pxa210_name:
.asciz "XScale-PXA210"
.size cpu_pxa210_name, . - cpu_pxa210_name
.type cpu_pxa255_name, #object
cpu_pxa255_name:
.asciz "XScale-PXA255"
.size cpu_pxa255_name, . - cpu_pxa255_name
.type cpu_pxa270_name, #object
cpu_pxa270_name:
.asciz "XScale-PXA270"
.size cpu_pxa270_name, . - cpu_pxa270_name
.align
.section ".proc.info", #alloc, #execinstr
......@@ -686,7 +696,7 @@ __80321_proc_info:
.type __pxa250_proc_info,#object
__pxa250_proc_info:
.long 0x69052100
.long 0xfffff3f0
.long 0xfffff7f0
.long 0x00000c0e
b __xscale_setup
.long cpu_arch_name
......@@ -715,3 +725,35 @@ __pxa210_proc_info:
.long xscale_cache_fns
.size __pxa210_proc_info, . - __pxa210_proc_info
.type __pxa255_proc_info,#object
__pxa255_proc_info:
.long 0x69052d00
.long 0xfffffff0
.long 0x00000c0e
b __xscale_setup
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
.long cpu_pxa255_name
.long xscale_processor_functions
.long v4wbi_tlb_fns
.long xscale_mc_user_fns
.long xscale_cache_fns
.size __pxa255_proc_info, . - __pxa255_proc_info
.type __pxa270_proc_info,#object
__pxa270_proc_info:
.long 0x69054110
.long 0xfffffff0
.long 0x00000c0e
b __xscale_setup
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
.long cpu_pxa270_name
.long xscale_processor_functions
.long v4wbi_tlb_fns
.long xscale_mc_user_fns
.long xscale_cache_fns
.size __pxa270_proc_info, . - __pxa270_proc_info
......@@ -60,7 +60,7 @@ static const char *probes[] = { "RedBoot", "cmdlinepart", NULL };
static int __init init_lubbock(void)
{
int flashboot = (CONF_SWITCHES & 1);
int flashboot = (LUB_CONF_SWITCHES & 1);
int ret = 0, i;
lubbock_maps[0].buswidth = lubbock_maps[1].buswidth =
......
......@@ -10,11 +10,10 @@
* published by the Free Software Foundation.
*/
#define LUBBOCK_FPGA_PHYS PXA_CS2_PHYS
#define LUBBOCK_FPGA_VIRT (0xf0000000) /* phys 0x08000000 */
#define LUBBOCK_ETH_PHYS PXA_CS3_PHYS
#define LUBBOCK_ETH_VIRT (0xf1000000)
#define LUBBOCK_FPGA_PHYS PXA_CS2_PHYS
#define LUBBOCK_FPGA_VIRT (0xf0000000)
#define LUB_P2V(x) ((x) - LUBBOCK_FPGA_PHYS + LUBBOCK_FPGA_VIRT)
#define LUB_V2P(x) ((x) - LUBBOCK_FPGA_VIRT + LUBBOCK_FPGA_PHYS)
......@@ -24,89 +23,15 @@
# define __LUB_REG(x) LUB_P2V(x)
#endif
/* board level registers in the CPLD: (offsets from CPLD_BASE) */
#define WHOAMI 0 // card ID's (see programmers manual)
#define HEX_LED 0x10 // R/W access to 8 7 segment displays
#define DISC_BLNK_LED 0x40 // R/W [15-8] enables for hex leds, [7-0] discrete LEDs
#define CONF_SWITCHES 0x50 // RO [1] flash wrt prot, [0] 0= boot from rom, 1= flash
#define USER_SWITCHES 0x60 // RO [15-8] dip switches, [7-0] 2 hex encoding switches
#define MISC_WR 0x80 // R/W various system controls -see manual
#define MISC_RD 0x90 // RO various system status bits -see manual
//#define LUB_IRQ_MASK_EN 0xC0 // R/W 0= mask, 1= enable of TS, codec, ethernet, USB, SA1111, and card det. irq's
//#define LUB_IRQ_SET_CLR 0xD0 // R/W 1= set, 0 = clear IRQ's from TS, codec, etc...
//#define LUB_GP 0x100 // R/W [15-0] 16 bits of general purpose I/o for hacking
/* FPGA register physical addresses */
#define _LUB_WHOAMI (LUBBOCK_FPGA_PHYS + 0x000)
#define _LUB_HEXLED (LUBBOCK_FPGA_PHYS + 0x010)
#define _LUB_DISC_BLNK_LED (LUBBOCK_FPGA_PHYS + 0x040)
#define _LUB_CONF_SWITCHES (LUBBOCK_FPGA_PHYS + 0x050)
#define _LUB_USER_SWITCHES (LUBBOCK_FPGA_PHYS + 0x060)
#define _LUB_MISC_WR (LUBBOCK_FPGA_PHYS + 0x080)
#define _LUB_MISC_RD (LUBBOCK_FPGA_PHYS + 0x090)
#define _LUB_IRQ_MASK_EN (LUBBOCK_FPGA_PHYS + 0x0C0)
#define _LUB_IRQ_SET_CLR (LUBBOCK_FPGA_PHYS + 0x0D0)
#define _LUB_GP (LUBBOCK_FPGA_PHYS + 0x100)
/* FPGA register virtual addresses */
#define LUB_WHOAMI __LUB_REG(_LUB_WHOAMI)
#define LUB_HEXLED __LUB_REG(_LUB_HEXLED)
#define LUB_DISC_BLNK_LED __LUB_REG(_LUB_DISC_BLNK_LED)
#define LUB_CONF_SWITCHES __LUB_REG(_LUB_CONF_SWITCHES)
#define LUB_USER_SWITCHES __LUB_REG(_LUB_USER_SWITCHES)
#define LUB_MISC_WR __LUB_REG(_LUB_MISC_WR)
#define LUB_MISC_RD __LUB_REG(_LUB_MISC_RD)
#define LUB_IRQ_MASK_EN __LUB_REG(_LUB_IRQ_MASK_EN)
#define LUB_IRQ_SET_CLR __LUB_REG(_LUB_IRQ_SET_CLR)
#define LUB_GP __LUB_REG(_LUB_GP)
/* GPIOs */
#define GPIO_LUBBOCK_IRQ 0
#define IRQ_GPIO_LUBBOCK_IRQ IRQ_GPIO0
/*
* LED macros
*/
#define LEDS_BASE LUB_DISC_BLNK_LED
// 8 discrete leds available for general use:
#define D28 0x1
#define D27 0x2
#define D26 0x4
#define D25 0x8
#define D24 0x10
#define D23 0x20
#define D22 0x40
#define D21 0x80
/* Note: bits [15-8] are used to enable/blank the 8 7 segment hex displays so
* be sure to not monkey with them here.
*/
#define HEARTBEAT_LED D28
#define SYS_BUSY_LED D27
#define HEXLEDS_BASE LUB_HEXLED
#define HEARTBEAT_LED_ON (LEDS_BASE &= ~HEARTBEAT_LED)
#define HEARTBEAT_LED_OFF (LEDS_BASE |= HEARTBEAT_LED)
#define SYS_BUSY_LED_OFF (LEDS_BASE |= SYS_BUSY_LED)
#define SYS_BUSY_LED_ON (LEDS_BASE &= ~SYS_BUSY_LED)
// use x = D26-D21 for these, please...
#define DISCRETE_LED_ON(x) (LEDS_BASE &= ~(x))
#define DISCRETE_LED_OFF(x) (LEDS_BASE |= (x))
#ifndef __ASSEMBLY__
//extern int hexled_val = 0;
#endif
#define LUB_WHOAMI __LUB_REG(LUBBOCK_FPGA_PHYS + 0x000)
#define LUB_HEXLED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x010)
#define LUB_DISC_BLNK_LED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x040)
#define LUB_CONF_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x050)
#define LUB_USER_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x060)
#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)
#define LUB_MISC_RD __LUB_REG(LUBBOCK_FPGA_PHYS + 0x090)
#define LUB_IRQ_MASK_EN __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0c0)
#define LUB_IRQ_SET_CLR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0d0)
#define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100)
#define BUMP_COUNTER (HEXLEDS_BASE = hexled_val++)
#define DEC_COUNTER (HEXLEDS_BASE = hexled_val--)
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