mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 00:26:39 +08:00
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: ARM: 6482/2: Fix find_next_zero_bit and related assembly ARM: 6490/1: MM: bugfix: initialize spinlock for init_mm.context ARM: avoid annoying <4>'s in printk output SCSI: arm fas216: fix missing ';' ARM: avoid marking decompressor .stack section as having contents ARM: 6489/1: thumb2: fix incorrect optimisation in usracc ARM: 6488/1: nomadik: prevent sched_clock() wraparound ARM: 6484/1: fix compile warning in mm/init.c ARM: 6473/1: Small update to ux500 specific L2 cache code ARM: improve compiler's ability to optimize page tables mx25: fix spi device registration typo ARM i.MX27 eukrea: Fix compilation ARM i.MX spi: fix compilation for i.MX21 ARM i.MX pcm037 eet: compile fixes ARM i.MX: sdma is merged, so remove #ifdef SDMA_IS_MERGED ARM mx3fb: check for DMA engine type mach-pcm037_eet: Fix section mismatch for eet_init_devices()
This commit is contained in:
commit
0b9466ccea
@ -1084,6 +1084,6 @@ memdump: mov r12, r0
|
||||
reloc_end:
|
||||
|
||||
.align
|
||||
.section ".stack", "w"
|
||||
.section ".stack", "aw", %nobits
|
||||
user_stack: .space 4096
|
||||
user_stack_end:
|
||||
|
@ -57,7 +57,7 @@ SECTIONS
|
||||
.bss : { *(.bss) }
|
||||
_end = .;
|
||||
|
||||
.stack (NOLOAD) : { *(.stack) }
|
||||
.stack : { *(.stack) }
|
||||
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
|
@ -238,7 +238,7 @@
|
||||
@ Slightly optimised to avoid incrementing the pointer twice
|
||||
usraccoff \instr, \reg, \ptr, \inc, 0, \cond, \abort
|
||||
.if \rept == 2
|
||||
usraccoff \instr, \reg, \ptr, \inc, 4, \cond, \abort
|
||||
usraccoff \instr, \reg, \ptr, \inc, \inc, \cond, \abort
|
||||
.endif
|
||||
|
||||
add\cond \ptr, #\rept * \inc
|
||||
|
@ -13,6 +13,10 @@ typedef struct {
|
||||
|
||||
#ifdef CONFIG_CPU_HAS_ASID
|
||||
#define ASID(mm) ((mm)->context.id & 255)
|
||||
|
||||
/* init_mm.context.id_lock should be initialized. */
|
||||
#define INIT_MM_CONTEXT(name) \
|
||||
.context.id_lock = __SPIN_LOCK_UNLOCKED(name.context.id_lock),
|
||||
#else
|
||||
#define ASID(mm) (0)
|
||||
#endif
|
||||
|
@ -374,6 +374,9 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd)
|
||||
|
||||
#define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd)))
|
||||
|
||||
/* we don't need complex calculations here as the pmd is folded into the pgd */
|
||||
#define pmd_addr_end(addr,end) (end)
|
||||
|
||||
/*
|
||||
* Conversion functions: convert a page and protection to a page entry,
|
||||
* and a page entry and page directory to the page they refer to.
|
||||
|
@ -174,8 +174,8 @@ ENDPROC(_find_next_bit_be)
|
||||
*/
|
||||
.L_found:
|
||||
#if __LINUX_ARM_ARCH__ >= 5
|
||||
rsb r1, r3, #0
|
||||
and r3, r3, r1
|
||||
rsb r0, r3, #0
|
||||
and r3, r3, r0
|
||||
clz r3, r3
|
||||
rsb r3, r3, #31
|
||||
add r0, r2, r3
|
||||
@ -190,5 +190,7 @@ ENDPROC(_find_next_bit_be)
|
||||
addeq r2, r2, #1
|
||||
mov r0, r2
|
||||
#endif
|
||||
cmp r1, r0 @ Clamp to maxbit
|
||||
movlo r0, r1
|
||||
mov pc, lr
|
||||
|
||||
|
@ -11,6 +11,6 @@
|
||||
#ifndef __ASM_ARCH_VMALLOC_H
|
||||
#define __ASM_ARCH_VMALLOC_H
|
||||
|
||||
#define VMALLOC_END 0xd0000000
|
||||
#define VMALLOC_END 0xd0000000UL
|
||||
|
||||
#endif /* __ASM_ARCH_VMALLOC_H */
|
||||
|
@ -22,4 +22,4 @@
|
||||
* 0xe0000000 to 0xefffffff. This gives us 256 MB of vm space and handles
|
||||
* larger physical memory designs better.
|
||||
*/
|
||||
#define VMALLOC_END 0xf0000000
|
||||
#define VMALLOC_END 0xf0000000UL
|
||||
|
@ -17,4 +17,4 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#define VMALLOC_END 0xd0000000
|
||||
#define VMALLOC_END 0xd0000000UL
|
||||
|
@ -7,4 +7,4 @@
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#define VMALLOC_END 0xdf000000
|
||||
#define VMALLOC_END 0xdf000000UL
|
||||
|
@ -7,4 +7,4 @@
|
||||
*/
|
||||
|
||||
|
||||
#define VMALLOC_END 0xf0000000
|
||||
#define VMALLOC_END 0xf0000000UL
|
||||
|
@ -5,6 +5,6 @@
|
||||
#ifndef __ARCH_ARM_VMALLOC_H
|
||||
#define __ARCH_ARM_VMALLOC_H
|
||||
|
||||
#define VMALLOC_END 0xd0000000
|
||||
#define VMALLOC_END 0xd0000000UL
|
||||
|
||||
#endif
|
||||
|
@ -250,9 +250,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_TOUCHSCREEN_ADS7846) \
|
||||
|| defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
|
||||
|
||||
#define ADS7846_PENDOWN (GPIO_PORTD | 25)
|
||||
|
||||
static void ads7846_dev_init(void)
|
||||
@ -273,9 +270,7 @@ static struct ads7846_platform_data ads7846_config __initdata = {
|
||||
.get_pendown_state = ads7846_get_pendown_state,
|
||||
.keep_vref_on = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
|
||||
static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
|
||||
[0] = {
|
||||
.modalias = "ads7846",
|
||||
@ -294,7 +289,6 @@ static const struct spi_imx_master eukrea_mbimx27_spi0_data __initconst = {
|
||||
.chipselect = eukrea_mbimx27_spi_cs,
|
||||
.num_chipselect = ARRAY_SIZE(eukrea_mbimx27_spi_cs),
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = {
|
||||
{
|
||||
|
@ -17,4 +17,4 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#define VMALLOC_END 0xd0000000
|
||||
#define VMALLOC_END 0xd0000000UL
|
||||
|
@ -16,7 +16,7 @@
|
||||
#ifndef __ASM_ARCH_MSM_VMALLOC_H
|
||||
#define __ASM_ARCH_MSM_VMALLOC_H
|
||||
|
||||
#define VMALLOC_END 0xd0000000
|
||||
#define VMALLOC_END 0xd0000000UL
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -42,9 +42,9 @@ extern const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst;
|
||||
#define imx25_add_mxc_nand(pdata) \
|
||||
imx_add_mxc_nand(&imx25_mxc_nand_data, pdata)
|
||||
|
||||
extern const struct imx_spi_imx_data imx25_spi_imx_data[] __initconst;
|
||||
extern const struct imx_spi_imx_data imx25_cspi_data[] __initconst;
|
||||
#define imx25_add_spi_imx(id, pdata) \
|
||||
imx_add_spi_imx(&imx25_spi_imx_data[id], pdata)
|
||||
imx_add_spi_imx(&imx25_cspi_data[id], pdata)
|
||||
#define imx25_add_spi_imx0(pdata) imx25_add_spi_imx(0, pdata)
|
||||
#define imx25_add_spi_imx1(pdata) imx25_add_spi_imx(1, pdata)
|
||||
#define imx25_add_spi_imx2(pdata) imx25_add_spi_imx(2, pdata)
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
#include <mach/common.h>
|
||||
#include <mach/iomux-mx3.h>
|
||||
#include <mach/spi.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
@ -59,14 +60,12 @@ static struct spi_board_info pcm037_spi_dev[] = {
|
||||
};
|
||||
|
||||
/* Platform Data for MXC CSPI */
|
||||
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
|
||||
static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)};
|
||||
|
||||
static const struct spi_imx_master pcm037_spi1_pdata __initconst = {
|
||||
.chipselect = pcm037_spi1_cs,
|
||||
.num_chipselect = ARRAY_SIZE(pcm037_spi1_cs),
|
||||
};
|
||||
#endif
|
||||
|
||||
/* GPIO-keys input device */
|
||||
static struct gpio_keys_button pcm037_gpio_keys[] = {
|
||||
@ -171,7 +170,7 @@ static struct platform_device pcm037_gpio_keys_device = {
|
||||
},
|
||||
};
|
||||
|
||||
static int eet_init_devices(void)
|
||||
static int __init eet_init_devices(void)
|
||||
{
|
||||
if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET)
|
||||
return 0;
|
||||
|
@ -16,4 +16,4 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#define VMALLOC_END 0xd0000000
|
||||
#define VMALLOC_END 0xd0000000UL
|
||||
|
@ -17,4 +17,4 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#define VMALLOC_END 0xd8000000
|
||||
#define VMALLOC_END 0xd8000000UL
|
||||
|
@ -17,4 +17,4 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#define VMALLOC_END 0xf8000000
|
||||
#define VMALLOC_END 0xf8000000UL
|
||||
|
@ -17,4 +17,4 @@
|
||||
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
|
||||
* area for the same reason. ;)
|
||||
*/
|
||||
#define VMALLOC_END 0xd0000000
|
||||
#define VMALLOC_END 0xd0000000UL
|
||||
|
@ -7,4 +7,4 @@
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#define VMALLOC_END 0xdc000000
|
||||
#define VMALLOC_END 0xdc000000UL
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
* arch/arm/mach-shark/include/mach/vmalloc.h
|
||||
*/
|
||||
#define VMALLOC_END 0xd0000000
|
||||
#define VMALLOC_END 0xd0000000UL
|
||||
|
@ -75,14 +75,14 @@ void __init ux500_init_irq(void)
|
||||
static inline void ux500_cache_wait(void __iomem *reg, unsigned long mask)
|
||||
{
|
||||
/* wait for the operation to complete */
|
||||
while (readl(reg) & mask)
|
||||
while (readl_relaxed(reg) & mask)
|
||||
;
|
||||
}
|
||||
|
||||
static inline void ux500_cache_sync(void)
|
||||
{
|
||||
void __iomem *base = __io_address(UX500_L2CC_BASE);
|
||||
writel(0, base + L2X0_CACHE_SYNC);
|
||||
writel_relaxed(0, base + L2X0_CACHE_SYNC);
|
||||
ux500_cache_wait(base + L2X0_CACHE_SYNC, 1);
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ static void ux500_l2x0_inv_all(void)
|
||||
uint32_t l2x0_way_mask = (1<<16) - 1; /* Bitmask of active ways */
|
||||
|
||||
/* invalidate all ways */
|
||||
writel(l2x0_way_mask, l2x0_base + L2X0_INV_WAY);
|
||||
writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY);
|
||||
ux500_cache_wait(l2x0_base + L2X0_INV_WAY, l2x0_way_mask);
|
||||
ux500_cache_sync();
|
||||
}
|
||||
|
@ -18,4 +18,4 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#define VMALLOC_END 0xd8000000
|
||||
#define VMALLOC_END 0xd8000000UL
|
||||
|
@ -206,8 +206,8 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
|
||||
*/
|
||||
if (pfn_valid(pfn)) {
|
||||
printk(KERN_WARNING "BUG: Your driver calls ioremap() on system memory. This leads\n"
|
||||
KERN_WARNING "to architecturally unpredictable behaviour on ARMv6+, and ioremap()\n"
|
||||
KERN_WARNING "will fail in the next kernel release. Please fix your driver.\n");
|
||||
"to architecturally unpredictable behaviour on ARMv6+, and ioremap()\n"
|
||||
"will fail in the next kernel release. Please fix your driver.\n");
|
||||
WARN_ON(1);
|
||||
}
|
||||
|
||||
|
@ -12,15 +12,7 @@
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/devices-common.h>
|
||||
#ifdef SDMA_IS_MERGED
|
||||
#include <mach/sdma.h>
|
||||
#else
|
||||
struct sdma_platform_data {
|
||||
int sdma_version;
|
||||
char *cpu_name;
|
||||
int to_version;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct imx_imx_sdma_data {
|
||||
resource_size_t iobase;
|
||||
|
@ -27,6 +27,7 @@ const struct imx_spi_imx_data imx21_cspi_data[] __initconst = {
|
||||
imx_spi_imx_data_entry(MX21, CSPI, "imx21-cspi", _id, _hwid, SZ_4K)
|
||||
imx21_cspi_data_entry(0, 1),
|
||||
imx21_cspi_data_entry(1, 2),
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_MX25
|
||||
|
@ -3,6 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2008 STMicroelectronics
|
||||
* Copyright (C) 2010 Alessandro Rubini
|
||||
* Copyright (C) 2010 Linus Walleij for ST-Ericsson
|
||||
*
|
||||
* 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
|
||||
@ -16,11 +17,13 @@
|
||||
#include <linux/clk.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/cnt32_to_63.h>
|
||||
#include <linux/timer.h>
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
#include <plat/mtu.h>
|
||||
|
||||
void __iomem *mtu_base; /* ssigned by machine code */
|
||||
void __iomem *mtu_base; /* Assigned by machine code */
|
||||
|
||||
/*
|
||||
* Kernel assumes that sched_clock can be called early
|
||||
@ -48,16 +51,82 @@ static struct clocksource nmdk_clksrc = {
|
||||
/*
|
||||
* Override the global weak sched_clock symbol with this
|
||||
* local implementation which uses the clocksource to get some
|
||||
* better resolution when scheduling the kernel. We accept that
|
||||
* this wraps around for now, since it is just a relative time
|
||||
* stamp. (Inspired by OMAP implementation.)
|
||||
* better resolution when scheduling the kernel.
|
||||
*
|
||||
* Because the hardware timer period may be quite short
|
||||
* (32.3 secs on the 133 MHz MTU timer selection on ux500)
|
||||
* and because cnt32_to_63() needs to be called at least once per
|
||||
* half period to work properly, a kernel keepwarm() timer is set up
|
||||
* to ensure this requirement is always met.
|
||||
*
|
||||
* Also the sched_clock timer will wrap around at some point,
|
||||
* here we set it to run continously for a year.
|
||||
*/
|
||||
#define SCHED_CLOCK_MIN_WRAP 3600*24*365
|
||||
static struct timer_list cnt32_to_63_keepwarm_timer;
|
||||
static u32 sched_mult;
|
||||
static u32 sched_shift;
|
||||
|
||||
unsigned long long notrace sched_clock(void)
|
||||
{
|
||||
return clocksource_cyc2ns(nmdk_clksrc.read(
|
||||
&nmdk_clksrc),
|
||||
nmdk_clksrc.mult,
|
||||
nmdk_clksrc.shift);
|
||||
u64 cycles;
|
||||
|
||||
if (unlikely(!mtu_base))
|
||||
return 0;
|
||||
|
||||
cycles = cnt32_to_63(-readl(mtu_base + MTU_VAL(0)));
|
||||
/*
|
||||
* sched_mult is guaranteed to be even so will
|
||||
* shift out bit 63
|
||||
*/
|
||||
return (cycles * sched_mult) >> sched_shift;
|
||||
}
|
||||
|
||||
/* Just kick sched_clock every so often */
|
||||
static void cnt32_to_63_keepwarm(unsigned long data)
|
||||
{
|
||||
mod_timer(&cnt32_to_63_keepwarm_timer, round_jiffies(jiffies + data));
|
||||
(void) sched_clock();
|
||||
}
|
||||
|
||||
/*
|
||||
* Set up a timer to keep sched_clock():s 32_to_63 algorithm warm
|
||||
* once in half a 32bit timer wrap interval.
|
||||
*/
|
||||
static void __init nmdk_sched_clock_init(unsigned long rate)
|
||||
{
|
||||
u32 v;
|
||||
unsigned long delta;
|
||||
u64 days;
|
||||
|
||||
/* Find the apropriate mult and shift factors */
|
||||
clocks_calc_mult_shift(&sched_mult, &sched_shift,
|
||||
rate, NSEC_PER_SEC, SCHED_CLOCK_MIN_WRAP);
|
||||
/* We need to multiply by an even number to get rid of bit 63 */
|
||||
if (sched_mult & 1)
|
||||
sched_mult++;
|
||||
|
||||
/* Let's see what we get, take max counter and scale it */
|
||||
days = (0xFFFFFFFFFFFFFFFFLLU * sched_mult) >> sched_shift;
|
||||
do_div(days, NSEC_PER_SEC);
|
||||
do_div(days, (3600*24));
|
||||
|
||||
pr_info("sched_clock: using %d bits @ %lu Hz wrap in %lu days\n",
|
||||
(64 - sched_shift), rate, (unsigned long) days);
|
||||
|
||||
/*
|
||||
* Program a timer to kick us at half 32bit wraparound
|
||||
* Formula: seconds per wrap = (2^32) / f
|
||||
*/
|
||||
v = 0xFFFFFFFFUL / rate;
|
||||
/* We want half of the wrap time to keep cnt32_to_63 warm */
|
||||
v /= 2;
|
||||
pr_debug("sched_clock: prescaled timer rate: %lu Hz, "
|
||||
"initialize keepwarm timer every %d seconds\n", rate, v);
|
||||
/* Convert seconds to jiffies */
|
||||
delta = msecs_to_jiffies(v*1000);
|
||||
setup_timer(&cnt32_to_63_keepwarm_timer, cnt32_to_63_keepwarm, delta);
|
||||
mod_timer(&cnt32_to_63_keepwarm_timer, round_jiffies(jiffies + delta));
|
||||
}
|
||||
|
||||
/* Clockevent device: use one-shot mode */
|
||||
@ -161,13 +230,15 @@ void __init nmdk_timer_init(void)
|
||||
writel(0, mtu_base + MTU_BGLR(0));
|
||||
writel(cr | MTU_CRn_ENA, mtu_base + MTU_CR(0));
|
||||
|
||||
/* Now the scheduling clock is ready */
|
||||
/* Now the clock source is ready */
|
||||
nmdk_clksrc.read = nmdk_read_timer;
|
||||
|
||||
if (clocksource_register(&nmdk_clksrc))
|
||||
pr_err("timer: failed to initialize clock source %s\n",
|
||||
nmdk_clksrc.name);
|
||||
|
||||
nmdk_sched_clock_init(rate);
|
||||
|
||||
/* Timer 1 is used for events */
|
||||
|
||||
clockevents_calc_mult_shift(&nmdk_clkevt, rate, MTU_MIN_RANGE);
|
||||
|
@ -345,7 +345,7 @@ extern int fas216_queue_command(struct Scsi_Host *h, struct scsi_cmnd *SCpnt);
|
||||
* : SCpnt - Command to queue
|
||||
* Returns : 0 - success, else error
|
||||
*/
|
||||
extern int fas216_noqueue_command(struct Scsi_Host *, struct scsi_cmnd *)
|
||||
extern int fas216_noqueue_command(struct Scsi_Host *, struct scsi_cmnd *);
|
||||
|
||||
/* Function: irqreturn_t fas216_intr (FAS216_Info *info)
|
||||
* Purpose : handle interrupts from the interface to progress a command
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <linux/clk.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#include <mach/dma.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/ipu.h>
|
||||
#include <mach/mx3fb.h>
|
||||
@ -1420,6 +1421,9 @@ static bool chan_filter(struct dma_chan *chan, void *arg)
|
||||
struct device *dev;
|
||||
struct mx3fb_platform_data *mx3fb_pdata;
|
||||
|
||||
if (!imx_dma_is_ipu(chan))
|
||||
return false;
|
||||
|
||||
if (!rq)
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user