Skip to content

Commit

Permalink
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Browse files Browse the repository at this point in the history
* master.kernel.org:/home/rmk/linux-2.6-arm: (23 commits)
  [ARM] Fix virtual to physical translation macro corner cases
  [ARM] update mach-types
  [ARM] 5421/1: ftrace: fix crash due to tracing of __naked functions
  MX1 fix include
  [ARM] 5419/1: ep93xx: fix build warnings about struct i2c_board_info
  [ARM] 5418/1: restore lr before leaving mcount
  ARM: OMAP: board-omap3beagle: set i2c-3 to 100kHz
  ARM: OMAP: Allow I2C bus driver to be compiled as a module
  ARM: OMAP: sched_clock() corrected
  ARM: OMAP: Fix compile error if pm.h is included
  [ARM] orion5x: pass dram mbus data to xor driver
  [ARM] S3C64XX: Fix s3c64xx_setrate_clksrc
  [ARM] S3C64XX: sparse warnings in arch/arm/plat-s3c64xx/irq.c
  [ARM] S3C64XX: sparse warnings in arch/arm/plat-s3c64xx/s3c6400-clock.c
  [ARM] S3C64XX: Fix USB host clock mux list
  [ARM] S3C64XX: Fix name of USB host clock.
  [ARM] S3C64XX: Rename IRQ_UHOST to IRQ_USBH
  [ARM] S3C64XX: Do gpiolib configuration earlier
  [ARM] S3C64XX: Staticise s3c64xx_init_irq_eint()
  [ARM] SMDK6410: Declare iodesc table static
  ...
  • Loading branch information
Linus Torvalds committed Mar 15, 2009
2 parents 18553c3 + 1522ac3 commit fbd8104
Show file tree
Hide file tree
Showing 30 changed files with 226 additions and 54 deletions.
4 changes: 4 additions & 0 deletions arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ ENTRY(mcount)
.globl mcount_call
mcount_call:
bl ftrace_stub
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc}

ENTRY(ftrace_caller)
Expand All @@ -122,6 +123,7 @@ ENTRY(ftrace_caller)
.globl ftrace_call
ftrace_call:
bl ftrace_stub
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc}

#else
Expand All @@ -133,6 +135,7 @@ ENTRY(mcount)
adr r0, ftrace_stub
cmp r0, r2
bne trace
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc}

trace:
Expand All @@ -141,6 +144,7 @@ trace:
sub r0, r0, #MCOUNT_INSN_SIZE
mov lr, pc
mov pc, r2
mov lr, r1 @ restore lr
ldmia sp!, {r0-r3, pc}

#endif /* CONFIG_DYNAMIC_FTRACE */
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/kernel/fiq.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void set_fiq_handler(void *start, unsigned int length)
* disable irqs for the duration. Note - these functions are almost
* entirely coded in assembly.
*/
void __attribute__((naked)) set_fiq_regs(struct pt_regs *regs)
void __naked set_fiq_regs(struct pt_regs *regs)
{
register unsigned long tmp;
asm volatile (
Expand All @@ -106,7 +106,7 @@ void __attribute__((naked)) set_fiq_regs(struct pt_regs *regs)
: "r" (&regs->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE));
}

void __attribute__((naked)) get_fiq_regs(struct pt_regs *regs)
void __naked get_fiq_regs(struct pt_regs *regs)
{
register unsigned long tmp;
asm volatile (
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-ep93xx/include/mach/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#ifndef __ASSEMBLY__

struct i2c_board_info;

struct ep93xx_eth_data
{
unsigned char dev_addr[6];
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-mx1/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>

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

static struct resource imx_csi_resources[] = {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-mx1/mx1ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <asm/mach/arch.h>
#include <asm/mach/time.h>

#include <mach/irqs.h>
#include <mach/hardware.h>
#include <mach/common.h>
#include <mach/imx-uart.h>
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mach-omap2/board-omap3beagle.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ static int __init omap3_beagle_i2c_init(void)
#ifdef CONFIG_I2C2_OMAP_BEAGLE
omap_register_i2c_bus(2, 400, NULL, 0);
#endif
omap_register_i2c_bus(3, 400, NULL, 0);
/* Bus 3 is attached to the DVI port where devices like the pico DLP
* projector don't work reliably with 400kHz */
omap_register_i2c_bus(3, 100, NULL, 0);
return 0;
}

Expand Down
7 changes: 7 additions & 0 deletions arch/arm/mach-orion5x/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ void __init orion5x_uart1_init(void)
/*****************************************************************************
* XOR engine
****************************************************************************/
struct mv_xor_platform_shared_data orion5x_xor_shared_data = {
.dram = &orion5x_mbus_dram_info,
};

static struct resource orion5x_xor_shared_resources[] = {
{
.name = "xor low",
Expand All @@ -448,6 +452,9 @@ static struct resource orion5x_xor_shared_resources[] = {
static struct platform_device orion5x_xor_shared = {
.name = MV_XOR_SHARED_NAME,
.id = 0,
.dev = {
.platform_data = &orion5x_xor_shared_data,
},
.num_resources = ARRAY_SIZE(orion5x_xor_shared_resources),
.resource = orion5x_xor_shared_resources,
};
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-s3c6410/mach-smdk6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = {
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
};

struct map_desc smdk6410_iodesc[] = {};
static struct map_desc smdk6410_iodesc[] = {};

static struct platform_device *smdk6410_devices[] __initdata = {
#ifdef CONFIG_SMDK6410_SD_CH0
Expand All @@ -146,7 +146,7 @@ static struct platform_device *smdk6410_devices[] __initdata = {

static struct i2c_board_info i2c_devs0[] __initdata = {
{ I2C_BOARD_INFO("24c08", 0x50), },
{ I2C_BOARD_INFO("WM8580", 0X1b), },
{ I2C_BOARD_INFO("wm8580", 0x1b), },
};

static struct i2c_board_info i2c_devs1[] __initdata = {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/copypage-feroceon.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <linux/init.h>
#include <linux/highmem.h>

static void __attribute__((naked))
static void __naked
feroceon_copy_user_page(void *kto, const void *kfrom)
{
asm("\
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/copypage-v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* FIXME: do we need to handle cache stuff...
*/
static void __attribute__((naked))
static void __naked
v3_copy_user_page(void *kto, const void *kfrom)
{
asm("\n\
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/copypage-v4mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static DEFINE_SPINLOCK(minicache_lock);
* instruction. If your processor does not supply this, you have to write your
* own copy_user_highpage that does the right thing.
*/
static void __attribute__((naked))
static void __naked
mc_copy_user_page(void *from, void *to)
{
asm volatile(
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/copypage-v4wb.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* instruction. If your processor does not supply this, you have to write your
* own copy_user_highpage that does the right thing.
*/
static void __attribute__((naked))
static void __naked
v4wb_copy_user_page(void *kto, const void *kfrom)
{
asm("\
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/copypage-v4wt.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* dirty data in the cache. However, we do have to ensure that
* subsequent reads are up to date.
*/
static void __attribute__((naked))
static void __naked
v4wt_copy_user_page(void *kto, const void *kfrom)
{
asm("\
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/copypage-xsc3.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* if we eventually end up using our copied page.
*
*/
static void __attribute__((naked))
static void __naked
xsc3_mc_copy_user_page(void *kto, const void *kfrom)
{
asm("\
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/copypage-xscale.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static DEFINE_SPINLOCK(minicache_lock);
* Dcache aliasing issue. The writes will be forwarded to the write buffer,
* and merged as appropriate.
*/
static void __attribute__((naked))
static void __naked
mc_copy_user_page(void *from, void *to)
{
/*
Expand Down
20 changes: 12 additions & 8 deletions arch/arm/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,26 +490,30 @@ core_initcall(consistent_init);
*/
void dma_cache_maint(const void *start, size_t size, int direction)
{
const void *end = start + size;
void (*inner_op)(const void *, const void *);
void (*outer_op)(unsigned long, unsigned long);

BUG_ON(!virt_addr_valid(start) || !virt_addr_valid(end - 1));
BUG_ON(!virt_addr_valid(start) || !virt_addr_valid(start + size - 1));

switch (direction) {
case DMA_FROM_DEVICE: /* invalidate only */
dmac_inv_range(start, end);
outer_inv_range(__pa(start), __pa(end));
inner_op = dmac_inv_range;
outer_op = outer_inv_range;
break;
case DMA_TO_DEVICE: /* writeback only */
dmac_clean_range(start, end);
outer_clean_range(__pa(start), __pa(end));
inner_op = dmac_clean_range;
outer_op = outer_clean_range;
break;
case DMA_BIDIRECTIONAL: /* writeback and invalidate */
dmac_flush_range(start, end);
outer_flush_range(__pa(start), __pa(end));
inner_op = dmac_flush_range;
outer_op = outer_flush_range;
break;
default:
BUG();
}

inner_op(start, start + size);
outer_op(__pa(start), __pa(start) + size);
}
EXPORT_SYMBOL(dma_cache_maint);

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ void __init bootmem_init(void)
for_each_node(node)
bootmem_free_node(node, mi);

high_memory = __va(memend_pfn << PAGE_SHIFT);
high_memory = __va((memend_pfn << PAGE_SHIFT) - 1) + 1;

/*
* This doesn't seem to be used by the Linux memory manager any
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ int valid_phys_addr_range(unsigned long addr, size_t size)
{
if (addr < PHYS_OFFSET)
return 0;
if (addr + size > __pa(high_memory))
if (addr + size >= __pa(high_memory - 1))
return 0;

return 1;
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/plat-omap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o
obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
obj-$(CONFIG_I2C_OMAP) += i2c.o
i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
obj-y += $(i2c-omap-m) $(i2c-omap-y)

# OMAP mailbox framework
obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o
Expand Down
14 changes: 5 additions & 9 deletions arch/arm/plat-omap/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,21 +199,17 @@ static struct clocksource clocksource_32k = {
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};

/*
* Rounds down to nearest nsec.
*/
unsigned long long omap_32k_ticks_to_nsecs(unsigned long ticks_32k)
{
return cyc2ns(&clocksource_32k, ticks_32k);
}

/*
* Returns current time from boot in nsecs. It's OK for this to wrap
* around for now, as it's just a relative time stamp.
*/
unsigned long long sched_clock(void)
{
return omap_32k_ticks_to_nsecs(omap_32k_read());
unsigned long long ret;

ret = (unsigned long long)omap_32k_read();
ret = (ret * clocksource_32k.mult_orig) >> clocksource_32k.shift;
return ret;
}

static int __init omap_init_clocksource_32k(void)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-omap/include/mach/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extern void omap_map_common_io(void);
extern struct sys_timer omap_timer;
extern void omap_serial_init(void);
extern void omap_serial_enable_clocks(int enable);
#ifdef CONFIG_I2C_OMAP
#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
struct i2c_board_info const *info,
unsigned len);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-omap/include/mach/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
!defined(CONFIG_ARCH_OMAP15XX) && \
!defined(CONFIG_ARCH_OMAP16XX) && \
!defined(CONFIG_ARCH_OMAP24XX)
#error "Power management for this processor not implemented yet"
#warning "Power management for this processor not implemented yet"
#endif

#ifndef __ASSEMBLER__
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-s3c64xx/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static struct clk *clks[] __initdata = {
&clk_48m,
};

void s3c64xx_register_clocks(void)
void __init s3c64xx_register_clocks(void)
{
struct clk *clkp;
int ret;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-s3c64xx/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,4 +417,4 @@ static __init int s3c64xx_gpiolib_init(void)
return 0;
}

arch_initcall(s3c64xx_gpiolib_init);
core_initcall(s3c64xx_gpiolib_init);
2 changes: 1 addition & 1 deletion arch/arm/plat-s3c64xx/include/plat/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
#define IRQ_ONENAND1 S3C64XX_IRQ_VIC1(12)
#define IRQ_NFC S3C64XX_IRQ_VIC1(13)
#define IRQ_CFCON S3C64XX_IRQ_VIC1(14)
#define IRQ_UHOST S3C64XX_IRQ_VIC1(15)
#define IRQ_USBH S3C64XX_IRQ_VIC1(15)
#define IRQ_SPI0 S3C64XX_IRQ_VIC1(16)
#define IRQ_SPI1 S3C64XX_IRQ_VIC1(17)
#define IRQ_IIC S3C64XX_IRQ_VIC1(18)
Expand Down
15 changes: 14 additions & 1 deletion arch/arm/plat-s3c64xx/irq-eint.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@

#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/gpio.h>
#include <linux/irq.h>
#include <linux/io.h>

#include <asm/hardware/vic.h>

#include <plat/regs-irqtype.h>
#include <plat/regs-gpio.h>
#include <plat/gpio-cfg.h>

#include <mach/map.h>
#include <plat/cpu.h>
Expand Down Expand Up @@ -74,6 +77,7 @@ static void s3c_irq_eint_maskack(unsigned int irq)
static int s3c_irq_eint_set_type(unsigned int irq, unsigned int type)
{
int offs = eint_offset(irq);
int pin;
int shift;
u32 ctrl, mask;
u32 newvalue = 0;
Expand Down Expand Up @@ -125,6 +129,15 @@ static int s3c_irq_eint_set_type(unsigned int irq, unsigned int type)
ctrl |= newvalue << shift;
__raw_writel(ctrl, reg);

/* set the GPIO pin appropriately */

if (offs < 23)
pin = S3C64XX_GPN(offs);
else
pin = S3C64XX_GPM(offs - 23);

s3c_gpio_cfgpin(pin, S3C_GPIO_SFN(2));

return 0;
}

Expand Down Expand Up @@ -181,7 +194,7 @@ static void s3c_irq_demux_eint20_27(unsigned int irq, struct irq_desc *desc)
s3c_irq_demux_eint(20, 27);
}

int __init s3c64xx_init_irq_eint(void)
static int __init s3c64xx_init_irq_eint(void)
{
int irq;

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-s3c64xx/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static struct irq_chip s3c_irq_uart = {

static void __init s3c64xx_uart_irq(struct uart_irq *uirq)
{
void *reg_base = uirq->regs;
void __iomem *reg_base = uirq->regs;
unsigned int irq;
int offs;

Expand Down
Loading

0 comments on commit fbd8104

Please sign in to comment.