[ARM] 5363/1: Shark cleanup and new defconfig

This includes a new defconfig for the Shark and some changes to
the mach-shark directory to avoid namespace pollution and to
switch the rtc to the newer driver.

Signed-off-by: Alexander Schulz <alex@shark-linux.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Alexander Schulz 2009-01-08 18:05:58 +01:00 committed by Russell King
parent 60f793de89
commit eab184c236
13 changed files with 678 additions and 404 deletions

File diff suppressed because it is too large Load Diff

View File

@ -16,12 +16,28 @@
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/param.h> #include <asm/param.h>
#include <mach/hardware.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#define IO_BASE 0xe0000000
#define IO_SIZE 0x08000000
#define IO_START 0x40000000
#define ROMCARD_SIZE 0x08000000
#define ROMCARD_START 0x10000000
void arch_reset(char mode)
{
short temp;
local_irq_disable();
/* Reset the Machine via pc[3] of the sequoia chipset */
outw(0x09,0x24);
temp=inw(0x26);
temp = temp | (1<<3) | (1<<10);
outw(0x09,0x24);
outw(temp,0x26);
}
static struct plat_serial8250_port serial_platform_data[] = { static struct plat_serial8250_port serial_platform_data[] = {
{ {
.iobase = 0x3f8, .iobase = 0x3f8,
@ -50,14 +66,38 @@ static struct platform_device serial_device = {
}, },
}; };
static struct resource rtc_resources[] = {
[0] = {
.start = 0x70,
.end = 0x73,
.flags = IORESOURCE_IO,
},
[1] = {
.start = IRQ_ISA_RTC_ALARM,
.end = IRQ_ISA_RTC_ALARM,
.flags = IORESOURCE_IRQ,
}
};
static struct platform_device rtc_device = {
.name = "rtc_cmos",
.id = -1,
.resource = rtc_resources,
.num_resources = ARRAY_SIZE(rtc_resources),
};
static int __init shark_init(void) static int __init shark_init(void)
{ {
int ret; int ret;
if (machine_is_shark()) if (machine_is_shark())
{
ret = platform_device_register(&rtc_device);
if (ret) printk(KERN_ERR "Unable to register RTC device: %d\n", ret);
ret = platform_device_register(&serial_device); ret = platform_device_register(&serial_device);
if (ret) printk(KERN_ERR "Unable to register Serial device: %d\n", ret);
return ret; }
return 0;
} }
arch_initcall(shark_init); arch_initcall(shark_init);

View File

@ -27,5 +27,3 @@
bne 1001b bne 1001b
.endm .endm
.macro waituart,rd,rx
.endm

View File

@ -0,0 +1,16 @@
/*
* arch/arm/mach-shark/include/mach/framebuffer.h
*
* by Alexander Schulz
*
*/
#ifndef __ASM_ARCH_FRAMEBUFFER_H
#define __ASM_ARCH_FRAMEBUFFER_H
/* defines for the Framebuffer */
#define FB_START 0x06000000
#define FB_SIZE 0x01000000
#endif

View File

@ -10,35 +10,8 @@
#ifndef __ASM_ARCH_HARDWARE_H #ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H #define __ASM_ARCH_HARDWARE_H
#ifndef __ASSEMBLY__
/*
* Mapping areas
*/
#define IO_BASE 0xe0000000
#else
#define IO_BASE 0
#endif
#define IO_SIZE 0x08000000
#define IO_START 0x40000000
#define ROMCARD_SIZE 0x08000000
#define ROMCARD_START 0x10000000
/* defines for the Framebuffer */
#define FB_START 0x06000000
#define FB_SIZE 0x01000000
#define UNCACHEABLE_ADDR 0xdf010000 #define UNCACHEABLE_ADDR 0xdf010000
#define SEQUOIA_LED_GREEN (1<<6)
#define SEQUOIA_LED_AMBER (1<<5)
#define SEQUOIA_LED_BACK (1<<7)
#define pcibios_assign_all_busses() 1 #define pcibios_assign_all_busses() 1
#define PCIBIOS_MIN_IO 0x6000 #define PCIBIOS_MIN_IO 0x6000

View File

@ -11,10 +11,10 @@
#ifndef __ASM_ARM_ARCH_IO_H #ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H #define __ASM_ARM_ARCH_IO_H
#define PCIO_BASE 0xe0000000 #define IO_SPACE_LIMIT 0xffffffff
#define IO_SPACE_LIMIT 0xffffffff
#define __io(a) ((void __iomem *)(PCIO_BASE + (a))) #define __io(a) ((void __iomem *)(0xe0000000 + (a)))
#define __mem_pci(addr) (addr)
#define __mem_pci(addr) (addr)
#endif #endif

View File

@ -7,7 +7,7 @@
#define NR_IRQS 16 #define NR_IRQS 16
#define IRQ_ISA_KEYBOARD 1 #define IRQ_ISA_KEYBOARD 1
#define RTC_IRQ 8 #define IRQ_ISA_RTC_ALARM 8
#define I8042_KBD_IRQ 1 #define I8042_KBD_IRQ 1
#define I8042_AUX_IRQ 12 #define I8042_AUX_IRQ 12
#define IRQ_HARDDISK 14 #define IRQ_HARDDISK 14

View File

@ -6,10 +6,6 @@
#ifndef __ASM_ARCH_DMA_H #ifndef __ASM_ARCH_DMA_H
#define __ASM_ARCH_DMA_H #define __ASM_ARCH_DMA_H
/* Use only the lowest 4MB, nothing else works.
* The rest is not DMAable. See dev / .properties
* in OpenFirmware.
*/
#define MAX_DMA_CHANNELS 8 #define MAX_DMA_CHANNELS 8
#define DMA_ISA_CASCADE 4 #define DMA_ISA_CASCADE 4

View File

@ -23,6 +23,7 @@ static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsig
{ {
if (node != 0) return; if (node != 0) return;
/* Only the first 4 MB (=1024 Pages) are usable for DMA */ /* Only the first 4 MB (=1024 Pages) are usable for DMA */
/* See dev / -> .properties in OpenFirmware. */
zone_size[1] = zone_size[0] - 1024; zone_size[1] = zone_size[0] - 1024;
zone_size[0] = 1024; zone_size[0] = 1024;
zhole_size[1] = zhole_size[0]; zhole_size[1] = zhole_size[0];

View File

@ -6,20 +6,8 @@
#ifndef __ASM_ARCH_SYSTEM_H #ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H #define __ASM_ARCH_SYSTEM_H
#include <linux/io.h> /* Found in arch/mach-shark/core.c */
extern void arch_reset(char mode);
static void arch_reset(char mode)
{
short temp;
local_irq_disable();
/* Reset the Machine via pc[3] of the sequoia chipset */
outw(0x09,0x24);
temp=inw(0x26);
temp = temp | (1<<3) | (1<<10);
outw(0x09,0x24);
outw(temp,0x26);
}
static inline void arch_idle(void) static inline void arch_idle(void)
{ {

View File

@ -11,7 +11,7 @@
static inline void putc(int c) static inline void putc(int c)
{ {
int t; volatile int t;
SERIAL_BASE[0] = c; SERIAL_BASE[0] = c;
t=0x10000; t=0x10000;

View File

@ -22,12 +22,16 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/io.h> #include <linux/io.h>
#include <mach/hardware.h>
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/system.h> #include <asm/system.h>
#define LED_STATE_ENABLED 1 #define LED_STATE_ENABLED 1
#define LED_STATE_CLAIMED 2 #define LED_STATE_CLAIMED 2
#define SEQUOIA_LED_GREEN (1<<6)
#define SEQUOIA_LED_AMBER (1<<5)
#define SEQUOIA_LED_BACK (1<<7)
static char led_state; static char led_state;
static short hw_led_state; static short hw_led_state;
static short saved_state; static short saved_state;

View File

@ -1425,7 +1425,7 @@ static void cyberpro_common_resume(struct cfb_info *cfb)
#ifdef CONFIG_ARCH_SHARK #ifdef CONFIG_ARCH_SHARK
#include <mach/hardware.h> #include <mach/framebuffer.h>
static int __devinit cyberpro_vl_probe(void) static int __devinit cyberpro_vl_probe(void)
{ {