diff options
author | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
---|---|---|
committer | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
commit | 871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch) | |
tree | 8718f573808810c2a1e8cb8fb6ac469093ca2784 /ANDROID_3.4.5/arch/arm/mach-shark | |
parent | 9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff) | |
download | FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2 FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip |
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized.
Changes are basically to make it look like kernel structure.
Diffstat (limited to 'ANDROID_3.4.5/arch/arm/mach-shark')
17 files changed, 0 insertions, 758 deletions
diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/Makefile b/ANDROID_3.4.5/arch/arm/mach-shark/Makefile deleted file mode 100644 index 45be9b04..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# -# Makefile for the linux kernel. -# - -# Object file lists. - -obj-y := core.o dma.o irq.o pci.o -obj-m := -obj-n := -obj- := - -obj-$(CONFIG_LEDS) += leds.o diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/Makefile.boot b/ANDROID_3.4.5/arch/arm/mach-shark/Makefile.boot deleted file mode 100644 index e40e24e4..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/Makefile.boot +++ /dev/null @@ -1,2 +0,0 @@ - zreladdr-y += 0x08008000 - diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/core.c b/ANDROID_3.4.5/arch/arm/mach-shark/core.c deleted file mode 100644 index 2704bcd8..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/core.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - * linux/arch/arm/mach-shark/arch.c - * - * Architecture specific stuff. - */ -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/interrupt.h> -#include <linux/irq.h> -#include <linux/sched.h> -#include <linux/serial_8250.h> -#include <linux/io.h> - -#include <asm/setup.h> -#include <asm/mach-types.h> -#include <asm/leds.h> -#include <asm/param.h> -#include <asm/system_misc.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 - -static void shark_restart(char mode, const char *cmd) -{ - short temp; - /* 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, - .irq = 4, - .uartclk = 1843200, - .regshift = 0, - .iotype = UPIO_PORT, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, - }, - { - .iobase = 0x2f8, - .irq = 3, - .uartclk = 1843200, - .regshift = 0, - .iotype = UPIO_PORT, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, - }, - { }, -}; - -static struct platform_device serial_device = { - .name = "serial8250", - .id = PLAT8250_DEV_PLATFORM, - .dev = { - .platform_data = serial_platform_data, - }, -}; - -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); - if (ret) printk(KERN_ERR "Unable to register Serial device: %d\n", ret); - } - return 0; -} - -arch_initcall(shark_init); - -extern void shark_init_irq(void); - -static struct map_desc shark_io_desc[] __initdata = { - { - .virtual = IO_BASE, - .pfn = __phys_to_pfn(IO_START), - .length = IO_SIZE, - .type = MT_DEVICE - } -}; - -static void __init shark_map_io(void) -{ - iotable_init(shark_io_desc, ARRAY_SIZE(shark_io_desc)); -} - -#define IRQ_TIMER 0 -#define HZ_TIME ((1193180 + HZ/2) / HZ) - -static irqreturn_t -shark_timer_interrupt(int irq, void *dev_id) -{ - timer_tick(); - return IRQ_HANDLED; -} - -static struct irqaction shark_timer_irq = { - .name = "Shark Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, - .handler = shark_timer_interrupt, -}; - -/* - * Set up timer interrupt, and return the current time in seconds. - */ -static void __init shark_timer_init(void) -{ - outb(0x34, 0x43); /* binary, mode 0, LSB/MSB, Ch 0 */ - outb(HZ_TIME & 0xff, 0x40); /* LSB of count */ - outb(HZ_TIME >> 8, 0x40); - - setup_irq(IRQ_TIMER, &shark_timer_irq); -} - -static struct sys_timer shark_timer = { - .init = shark_timer_init, -}; - -static void shark_init_early(void) -{ - disable_hlt(); -} - -MACHINE_START(SHARK, "Shark") - /* Maintainer: Alexander Schulz */ - .atag_offset = 0x3000, - .map_io = shark_map_io, - .init_early = shark_init_early, - .init_irq = shark_init_irq, - .timer = &shark_timer, - .dma_zone_size = SZ_4M, - .restart = shark_restart, -MACHINE_END diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/dma.c b/ANDROID_3.4.5/arch/arm/mach-shark/dma.c deleted file mode 100644 index 10b5b8b3..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/dma.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * linux/arch/arm/mach-shark/dma.c - * - * by Alexander Schulz - * - * derived from: - * arch/arm/kernel/dma-ebsa285.c - * Copyright (C) 1998 Phil Blundell - */ - -#include <linux/init.h> - -#include <asm/dma.h> -#include <asm/mach/dma.h> - -static int __init shark_dma_init(void) -{ -#ifdef CONFIG_ISA_DMA - isa_init_dma(); -#endif - return 0; -} -core_initcall(shark_dma_init); diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/debug-macro.S b/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/debug-macro.S deleted file mode 100644 index 20eb2bf2..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/debug-macro.S +++ /dev/null @@ -1,33 +0,0 @@ -/* arch/arm/mach-shark/include/mach/debug-macro.S - * - * Debugging macro include header - * - * Copyright (C) 1994-1999 Russell King - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * -*/ - - .macro addruart, rp, rv, tmp - mov \rp, #0xe0000000 - orr \rp, \rp, #0x000003f8 - mov \rv, \rp - .endm - - .macro senduart,rd,rx - strb \rd, [\rx] - .endm - - .macro waituart,rd,rx - .endm - - .macro busyuart,rd,rx - mov \rd, #0 -1001: add \rd, \rd, #1 - teq \rd, #0x10000 - bne 1001b - .endm - diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/entry-macro.S b/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/entry-macro.S deleted file mode 100644 index 5901b09f..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/entry-macro.S +++ /dev/null @@ -1,35 +0,0 @@ -/* - * arch/arm/mach-shark/include/mach/entry-macro.S - * - * Low-level IRQ helper macros for Shark platform - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - .macro get_irqnr_preamble, base, tmp - mov \base, #0xe0000000 - .endm - - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp - - mov \irqstat, #0x0C - strb \irqstat, [\base, #0x20] @outb(0x0C, 0x20) /* Poll command */ - ldrb \irqnr, [\base, #0x20] @irq = inb(0x20) & 7 - and \irqstat, \irqnr, #0x80 - teq \irqstat, #0 - beq 43f - and \irqnr, \irqnr, #7 - teq \irqnr, #2 - bne 44f -43: mov \irqstat, #0x0C - strb \irqstat, [\base, #0xa0] @outb(0x0C, 0xA0) /* Poll command */ - ldrb \irqnr, [\base, #0xa0] @irq = (inb(0xA0) & 7) + 8 - and \irqstat, \irqnr, #0x80 - teq \irqstat, #0 - beq 44f - and \irqnr, \irqnr, #7 - add \irqnr, \irqnr, #8 -44: teq \irqstat, #0 - .endm - diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/framebuffer.h b/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/framebuffer.h deleted file mode 100644 index 84a5bf6e..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/framebuffer.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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 - diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/hardware.h b/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/hardware.h deleted file mode 100644 index 663f952a..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/hardware.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * arch/arm/mach-shark/include/mach/hardware.h - * - * by Alexander Schulz - * - * derived from: - * arch/arm/mach-ebsa110/include/mach/hardware.h - * Copyright (C) 1996-1999 Russell King. - */ -#ifndef __ASM_ARCH_HARDWARE_H -#define __ASM_ARCH_HARDWARE_H - -#define UNCACHEABLE_ADDR 0xdf010000 - -#endif - diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/io.h b/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/io.h deleted file mode 100644 index 1a45fc01..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/io.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * arch/arm/mach-shark/include/mach/io.h - * - * by Alexander Schulz - * - * derived from: - * arch/arm/mach-ebsa110/include/mach/io.h - * Copyright (C) 1997,1998 Russell King - */ - -#ifndef __ASM_ARM_ARCH_IO_H -#define __ASM_ARM_ARCH_IO_H - -#define IO_SPACE_LIMIT 0xffffffff - -#define __io(a) ((void __iomem *)(0xe0000000 + (a))) - -#endif diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/irqs.h b/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/irqs.h deleted file mode 100644 index c8e8a4e1..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/irqs.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * arch/arm/mach-shark/include/mach/irqs.h - * - * by Alexander Schulz - */ - -#define NR_IRQS 16 - -#define IRQ_ISA_KEYBOARD 1 -#define IRQ_ISA_RTC_ALARM 8 -#define I8042_KBD_IRQ 1 -#define I8042_AUX_IRQ 12 -#define IRQ_HARDDISK 14 diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/isa-dma.h b/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/isa-dma.h deleted file mode 100644 index 96c43b8f..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/isa-dma.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * arch/arm/mach-shark/include/mach/isa-dma.h - * - * by Alexander Schulz - */ -#ifndef __ASM_ARCH_DMA_H -#define __ASM_ARCH_DMA_H - -#define MAX_DMA_CHANNELS 8 -#define DMA_ISA_CASCADE 4 - -#endif /* _ASM_ARCH_DMA_H */ - diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/memory.h b/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/memory.h deleted file mode 100644 index 1cf8d696..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/memory.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * arch/arm/mach-shark/include/mach/memory.h - * - * by Alexander Schulz - * - * derived from: - * arch/arm/mach-ebsa110/include/mach/memory.h - * Copyright (c) 1996-1999 Russell King. - */ -#ifndef __ASM_ARCH_MEMORY_H -#define __ASM_ARCH_MEMORY_H - -#include <asm/sizes.h> - -/* - * Physical DRAM offset. - */ -#define PLAT_PHYS_OFFSET UL(0x08000000) - -/* - * Cache flushing area - */ -#define FLUSH_BASE_PHYS 0x80000000 -#define FLUSH_BASE 0xdf000000 - -#endif diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/timex.h b/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/timex.h deleted file mode 100644 index bb6eeaeb..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/timex.h +++ /dev/null @@ -1,7 +0,0 @@ -/* - * arch/arm/mach-shark/include/mach/timex.h - * - * by Alexander Schulz - */ - -#define CLOCK_TICK_RATE 1193180 diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/uncompress.h b/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/uncompress.h deleted file mode 100644 index 22ccab4c..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/include/mach/uncompress.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * arch/arm/mach-shark/include/mach/uncompress.h - * by Alexander Schulz - * - * derived from: - * arch/arm/mach-footbridge/include/mach/uncompress.h - * Copyright (C) 1996,1997,1998 Russell King - */ - -#define SERIAL_BASE ((volatile unsigned char *)0x400003f8) - -static inline void putc(int c) -{ - volatile int t; - - SERIAL_BASE[0] = c; - t=0x10000; - while (t--); -} - -static inline void flush(void) -{ -} - -#ifdef DEBUG -static void putn(unsigned long z) -{ - int i; - char x; - - putc('0'); - putc('x'); - for (i=0;i<8;i++) { - x='0'+((z>>((7-i)*4))&0xf); - if (x>'9') x=x-'0'+'A'-10; - putc(x); - } -} - -static void putr() -{ - putc('\n'); - putc('\r'); -} -#endif - -/* - * nothing to do - */ -#define arch_decomp_setup() -#define arch_decomp_wdog() diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/irq.c b/ANDROID_3.4.5/arch/arm/mach-shark/irq.c deleted file mode 100644 index 5dce13e4..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/irq.c +++ /dev/null @@ -1,108 +0,0 @@ -/* - * linux/arch/arm/mach-shark/irq.c - * - * by Alexander Schulz - * - * derived from linux/arch/ppc/kernel/i8259.c and: - * arch/arm/mach-ebsa110/include/mach/irq.h - * Copyright (C) 1996-1998 Russell King - */ - -#include <linux/init.h> -#include <linux/fs.h> -#include <linux/interrupt.h> -#include <linux/io.h> - -#include <asm/irq.h> -#include <asm/mach/irq.h> - -/* - * 8259A PIC functions to handle ISA devices: - */ - -/* - * This contains the irq mask for both 8259A irq controllers, - * Let through the cascade-interrupt no. 2 (ff-(1<<2)==fb) - */ -static unsigned char cached_irq_mask[2] = { 0xfb, 0xff }; - -/* - * These have to be protected by the irq controller spinlock - * before being called. - */ -static void shark_disable_8259A_irq(struct irq_data *d) -{ - unsigned int mask; - if (d->irq<8) { - mask = 1 << d->irq; - cached_irq_mask[0] |= mask; - outb(cached_irq_mask[1],0xA1); - } else { - mask = 1 << (d->irq-8); - cached_irq_mask[1] |= mask; - outb(cached_irq_mask[0],0x21); - } -} - -static void shark_enable_8259A_irq(struct irq_data *d) -{ - unsigned int mask; - if (d->irq<8) { - mask = ~(1 << d->irq); - cached_irq_mask[0] &= mask; - outb(cached_irq_mask[0],0x21); - } else { - mask = ~(1 << (d->irq-8)); - cached_irq_mask[1] &= mask; - outb(cached_irq_mask[1],0xA1); - } -} - -static void shark_ack_8259A_irq(struct irq_data *d){} - -static irqreturn_t bogus_int(int irq, void *dev_id) -{ - printk("Got interrupt %i!\n",irq); - return IRQ_NONE; -} - -static struct irqaction cascade; - -static struct irq_chip fb_chip = { - .name = "XT-PIC", - .irq_ack = shark_ack_8259A_irq, - .irq_mask = shark_disable_8259A_irq, - .irq_unmask = shark_enable_8259A_irq, -}; - -void __init shark_init_irq(void) -{ - int irq; - - for (irq = 0; irq < NR_IRQS; irq++) { - irq_set_chip_and_handler(irq, &fb_chip, handle_edge_irq); - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); - } - - /* init master interrupt controller */ - outb(0x11, 0x20); /* Start init sequence, edge triggered (level: 0x19)*/ - outb(0x00, 0x21); /* Vector base */ - outb(0x04, 0x21); /* Cascade (slave) on IRQ2 */ - outb(0x03, 0x21); /* Select 8086 mode , auto eoi*/ - outb(0x0A, 0x20); - /* init slave interrupt controller */ - outb(0x11, 0xA0); /* Start init sequence, edge triggered */ - outb(0x08, 0xA1); /* Vector base */ - outb(0x02, 0xA1); /* Cascade (slave) on IRQ2 */ - outb(0x03, 0xA1); /* Select 8086 mode, auto eoi */ - outb(0x0A, 0xA0); - outb(cached_irq_mask[1],0xA1); - outb(cached_irq_mask[0],0x21); - //request_region(0x20,0x2,"pic1"); - //request_region(0xA0,0x2,"pic2"); - - cascade.handler = bogus_int; - cascade.name = "cascade"; - setup_irq(2,&cascade); -} - diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/leds.c b/ANDROID_3.4.5/arch/arm/mach-shark/leds.c deleted file mode 100644 index 25609076..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/leds.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - * arch/arm/mach-shark/leds.c - * by Alexander Schulz - * - * derived from: - * arch/arm/kernel/leds-footbridge.c - * Copyright (C) 1998-1999 Russell King - * - * DIGITAL Shark LED control routines. - * - * The leds use is as follows: - * - Green front - toggles state every 50 timer interrupts - * - Amber front - Unused, this is a dual color led (Amber/Green) - * - Amber back - On if system is not idle - * - * Changelog: - */ -#include <linux/kernel.h> -#include <linux/module.h> -#include <linux/init.h> -#include <linux/spinlock.h> -#include <linux/ioport.h> -#include <linux/io.h> - -#include <asm/leds.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; - -static DEFINE_RAW_SPINLOCK(leds_lock); - -short sequoia_read(int addr) { - outw(addr,0x24); - return inw(0x26); -} - -void sequoia_write(short value,short addr) { - outw(addr,0x24); - outw(value,0x26); -} - -static void sequoia_leds_event(led_event_t evt) -{ - unsigned long flags; - - raw_spin_lock_irqsave(&leds_lock, flags); - - hw_led_state = sequoia_read(0x09); - - switch (evt) { - case led_start: - hw_led_state |= SEQUOIA_LED_GREEN; - hw_led_state |= SEQUOIA_LED_AMBER; -#ifdef CONFIG_LEDS_CPU - hw_led_state |= SEQUOIA_LED_BACK; -#else - hw_led_state &= ~SEQUOIA_LED_BACK; -#endif - led_state |= LED_STATE_ENABLED; - break; - - case led_stop: - hw_led_state &= ~SEQUOIA_LED_BACK; - hw_led_state |= SEQUOIA_LED_GREEN; - hw_led_state |= SEQUOIA_LED_AMBER; - led_state &= ~LED_STATE_ENABLED; - break; - - case led_claim: - led_state |= LED_STATE_CLAIMED; - saved_state = hw_led_state; - hw_led_state &= ~SEQUOIA_LED_BACK; - hw_led_state |= SEQUOIA_LED_GREEN; - hw_led_state |= SEQUOIA_LED_AMBER; - break; - - case led_release: - led_state &= ~LED_STATE_CLAIMED; - hw_led_state = saved_state; - break; - -#ifdef CONFIG_LEDS_TIMER - case led_timer: - if (!(led_state & LED_STATE_CLAIMED)) - hw_led_state ^= SEQUOIA_LED_GREEN; - break; -#endif - -#ifdef CONFIG_LEDS_CPU - case led_idle_start: - if (!(led_state & LED_STATE_CLAIMED)) - hw_led_state &= ~SEQUOIA_LED_BACK; - break; - - case led_idle_end: - if (!(led_state & LED_STATE_CLAIMED)) - hw_led_state |= SEQUOIA_LED_BACK; - break; -#endif - - case led_green_on: - if (led_state & LED_STATE_CLAIMED) - hw_led_state &= ~SEQUOIA_LED_GREEN; - break; - - case led_green_off: - if (led_state & LED_STATE_CLAIMED) - hw_led_state |= SEQUOIA_LED_GREEN; - break; - - case led_amber_on: - if (led_state & LED_STATE_CLAIMED) - hw_led_state &= ~SEQUOIA_LED_AMBER; - break; - - case led_amber_off: - if (led_state & LED_STATE_CLAIMED) - hw_led_state |= SEQUOIA_LED_AMBER; - break; - - case led_red_on: - if (led_state & LED_STATE_CLAIMED) - hw_led_state |= SEQUOIA_LED_BACK; - break; - - case led_red_off: - if (led_state & LED_STATE_CLAIMED) - hw_led_state &= ~SEQUOIA_LED_BACK; - break; - - default: - break; - } - - if (led_state & LED_STATE_ENABLED) - sequoia_write(hw_led_state,0x09); - - raw_spin_unlock_irqrestore(&leds_lock, flags); -} - -static int __init leds_init(void) -{ - extern void (*leds_event)(led_event_t); - short temp; - - leds_event = sequoia_leds_event; - - /* Make LEDs independent of power-state */ - request_region(0x24,4,"sequoia"); - temp = sequoia_read(0x09); - temp |= 1<<10; - sequoia_write(temp,0x09); - leds_event(led_start); - return 0; -} - -__initcall(leds_init); diff --git a/ANDROID_3.4.5/arch/arm/mach-shark/pci.c b/ANDROID_3.4.5/arch/arm/mach-shark/pci.c deleted file mode 100644 index 7cb79a09..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-shark/pci.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * linux/arch/arm/mach-shark/pci.c - * - * PCI bios-type initialisation for PCI machines - * - * Bits taken from various places. - */ -#include <linux/kernel.h> -#include <linux/pci.h> -#include <linux/init.h> -#include <video/vga.h> - -#include <asm/irq.h> -#include <asm/mach/pci.h> -#include <asm/mach-types.h> - -static int __init shark_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) -{ - if (dev->bus->number == 0) - if (dev->devfn == 0) - return 255; - else - return 11; - else - return 255; -} - -extern void __init via82c505_preinit(void); - -static struct hw_pci shark_pci __initdata = { - .setup = via82c505_setup, - .swizzle = pci_std_swizzle, - .map_irq = shark_map_irq, - .nr_controllers = 1, - .scan = via82c505_scan_bus, - .preinit = via82c505_preinit, -}; - -static int __init shark_pci_init(void) -{ - if (!machine_is_shark()) - return; - - pcibios_min_io = 0x6000; - pcibios_min_mem = 0x50000000; - vga_base = 0xe8000000; - - pci_common_init(&shark_pci); - - return 0; -} - -subsys_initcall(shark_pci_init); |