Skip to content

Commit

Permalink
[ARM] 5363/1: Shark cleanup and new defconfig
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Schulz authored and Russell King committed Feb 19, 2009
1 parent 60f793d commit eab184c
Show file tree
Hide file tree
Showing 13 changed files with 668 additions and 394 deletions.
928 changes: 593 additions & 335 deletions arch/arm/configs/shark_defconfig

Large diffs are not rendered by default.

48 changes: 44 additions & 4 deletions arch/arm/mach-shark/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,28 @@
#include <asm/leds.h>
#include <asm/param.h>

#include <mach/hardware.h>

#include <asm/mach/map.h>
#include <asm/mach/arch.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[] = {
{
.iobase = 0x3f8,
Expand Down Expand Up @@ -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)
{
int ret;

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);

return ret;
if (ret) printk(KERN_ERR "Unable to register Serial device: %d\n", ret);
}
return 0;
}

arch_initcall(shark_init);
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-shark/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@
bne 1001b
.endm

.macro waituart,rd,rx
.endm
16 changes: 16 additions & 0 deletions arch/arm/mach-shark/include/mach/framebuffer.h
Original file line number Diff line number Diff line change
@@ -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

27 changes: 0 additions & 27 deletions arch/arm/mach-shark/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,8 @@
#ifndef __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 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_MIN_IO 0x6000
Expand Down
8 changes: 4 additions & 4 deletions arch/arm/mach-shark/include/mach/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#ifndef __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 __mem_pci(addr) (addr)
#define __io(a) ((void __iomem *)(0xe0000000 + (a)))

#define __mem_pci(addr) (addr)

#endif
2 changes: 1 addition & 1 deletion arch/arm/mach-shark/include/mach/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define NR_IRQS 16

#define IRQ_ISA_KEYBOARD 1
#define RTC_IRQ 8
#define IRQ_ISA_RTC_ALARM 8
#define I8042_KBD_IRQ 1
#define I8042_AUX_IRQ 12
#define IRQ_HARDDISK 14
4 changes: 0 additions & 4 deletions arch/arm/mach-shark/include/mach/isa-dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
#ifndef __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 DMA_ISA_CASCADE 4

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-shark/include/mach/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsig
{
if (node != 0) return;
/* 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[0] = 1024;
zhole_size[1] = zhole_size[0];
Expand Down
16 changes: 2 additions & 14 deletions arch/arm/mach-shark/include/mach/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,8 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H

#include <linux/io.h>

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);

}
/* Found in arch/mach-shark/core.c */
extern void arch_reset(char mode);

static inline void arch_idle(void)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-shark/include/mach/uncompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

static inline void putc(int c)
{
int t;
volatile int t;

SERIAL_BASE[0] = c;
t=0x10000;
Expand Down
6 changes: 5 additions & 1 deletion arch/arm/mach-shark/leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@
#include <linux/ioport.h>
#include <linux/io.h>

#include <mach/hardware.h>
#include <asm/leds.h>
#include <asm/system.h>

#define LED_STATE_ENABLED 1
#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 short hw_led_state;
static short saved_state;
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/cyber2000fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ static void cyberpro_common_resume(struct cfb_info *cfb)

#ifdef CONFIG_ARCH_SHARK

#include <mach/hardware.h>
#include <mach/framebuffer.h>

static int __devinit cyberpro_vl_probe(void)
{
Expand Down

0 comments on commit eab184c

Please sign in to comment.