* [PATCH 1/2] arch/arm/mach-omap2/dma.c: Convert IS_ERR result to PTR_ERR
From: Jarkko Nikula @ 2011-01-27 19:02 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1296143347-17508-1-git-send-email-julia@diku.dk>
On Thu, 27 Jan 2011 16:49:06 +0100
Julia Lawall <julia@diku.dk> wrote:
> diff -u -p a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
> --- a/arch/arm/mach-omap2/dma.c
> +++ b/arch/arm/mach-omap2/dma.c
> @@ -264,7 +264,7 @@ static int __init omap2_system_dma_init_
> if (IS_ERR(od)) {
> pr_err("%s: Cant build omap_device for %s:%s.\n",
> __func__, name, oh->name);
> - return IS_ERR(od);
> + return PTR_ERR(od);
> }
>
FWIW,
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
^ permalink raw reply
* [PATCH 11/14] ARM: v6k: use CPU domain feature if we include support for arch < ARMv6K
From: Russell King - ARM Linux @ 2011-01-27 18:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <AANLkTimN8Gn5a-k4ai7EhMGpqbj_u4Y8fHvUh_actzd+@mail.gmail.com>
On Thu, Jan 27, 2011 at 06:14:56PM +0000, Catalin Marinas wrote:
> On 17 January 2011 19:24, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > Rather than turning off CPU domain switching when the build architecture
> > includes ARMv6K, thereby causing problems for ARMv6-supporting kernels,
> > turn it on when it's required to support a CPU architecture.
>
> (sorry, I'm well behind list messages, didn't reply earlier)
>
> Does it mean that we get domains enabled even for ARMv7 when ARMv6 is
> built in the same kernel? The side effect is that user read-only
> addresses are writable by the kernel and SWP emulation no longer
> works.
It means that a kernel with ARMv6 through to ARMv7 will have CPU
domains enabled. So maybe we want:
config CPU_32v6
select CPU_USE_DOMAINS if !CPU_V6K && MMU
instead?
^ permalink raw reply
* [PATCH 0/5] OMAP3EVM: Board bug fixes/enhancements
From: Hiremath, Vaibhav @ 2011-01-27 18:46 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <87pqrinq8x.fsf@ti.com>
> -----Original Message-----
> From: Hilman, Kevin
> Sent: Friday, January 28, 2011 12:12 AM
> To: Hiremath, Vaibhav
> Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> Subject: Re: [PATCH 0/5] OMAP3EVM: Board bug fixes/enhancements
>
> Vaibhav Hiremath <hvaibhav@ti.com> writes:
>
> > The current linux-omap/master is broken for lots of features/modules
> > and also there are few enhancements required with addition of AM/DM37x
> > family of devices.
> >
> > - Migrate TWL gpio_xxx api to gpio_xx_cansleep
> > - TSC: Driver init fails due to missing VIO regulator
> > - TSC: Wakeup is broken, enable the wakeup capability
> > - DSS: Addition of Mux changes for AM/DM37x
> > - Make Backlight gpio off in default state
> >
> > Note: Resetting the revision of patches since this is first bundled
> series.
>
> Again, please state exactly what tree and commit this applies to, as it
> does not apply cleanly to l-o master.
>
> Specifically,
>
> > Vaibhav Hiremath (5):
> > OMAP:board-omap3evm: Change TWL related gpio API's to gpio*_cansleep
> > OMAP3EVM: Add vio regulator supply required for ads7846 TSC driver
> > AM/DM37x: DSS mux configuration for >Rev-B processor cards
>
> This one doesn't apply without fuzz.
>
> > OMAP3EVM: Made backlight GPIO default state to off
> > OMAP3EVM: Set TSC wakeup option in pad config
>
> And this one doesn't apply as it seems to apply on top of code that
> doesn't exist upstream.
>
[Hiremath, Vaibhav] Kevin,
You should first apply Ethernet-reset patch first, and then all patches will get applied cleanly. I have tested it here at my end.
Since you already acked Ethernet patch, I thought it will make its way to mainline before all these patches. And also while posting, I posted Ethernet patch again first and then this series.
Thanks,
Vaibhav
> Kevin
^ permalink raw reply
* [PATCH 5/5] OMAP3EVM: Set TSC wakeup option in pad config
From: Kevin Hilman @ 2011-01-27 18:42 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1295977061-11086-6-git-send-email-hvaibhav@ti.com>
Vaibhav Hiremath <hvaibhav@ti.com> writes:
> Set OMAP_PIN_OFF_WAKEUPENABLE to enable the wake-up
> functionality from touchscreen controller.
>
> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> ---
> arch/arm/mach-omap2/board-omap3evm.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
> index 2a2efa9..5eddf93 100644
> --- a/arch/arm/mach-omap2/board-omap3evm.c
> +++ b/arch/arm/mach-omap2/board-omap3evm.c
> @@ -716,7 +716,8 @@ static struct omap_board_mux omap35x_board_mux[] __initdata = {
> OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
> OMAP_PIN_OFF_WAKEUPENABLE),
> OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
> - OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW),
> + OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
> + OMAP_PIN_OFF_WAKEUPENABLE),
This hunk doesn't apply because the code below (SYS_BOOT5, etc.) doesn't
exist in upstream code.
Kevin
> OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
> OMAP_PIN_OFF_NONE),
> OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
> @@ -729,7 +730,8 @@ static struct omap_board_mux omap36x_board_mux[] __initdata = {
> OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
> OMAP_PIN_OFF_WAKEUPENABLE),
> OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
> - OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW),
> + OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
> + OMAP_PIN_OFF_WAKEUPENABLE),
> /* AM/DM37x EVM: DSS data bus muxed with sys_boot */
> OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
> OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
^ permalink raw reply
* [PATCH 0/5] OMAP3EVM: Board bug fixes/enhancements
From: Kevin Hilman @ 2011-01-27 18:41 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1295977061-11086-1-git-send-email-hvaibhav@ti.com>
Vaibhav Hiremath <hvaibhav@ti.com> writes:
> The current linux-omap/master is broken for lots of features/modules
> and also there are few enhancements required with addition of AM/DM37x
> family of devices.
>
> - Migrate TWL gpio_xxx api to gpio_xx_cansleep
> - TSC: Driver init fails due to missing VIO regulator
> - TSC: Wakeup is broken, enable the wakeup capability
> - DSS: Addition of Mux changes for AM/DM37x
> - Make Backlight gpio off in default state
>
> Note: Resetting the revision of patches since this is first bundled series.
Again, please state exactly what tree and commit this applies to, as it
does not apply cleanly to l-o master.
Specifically,
> Vaibhav Hiremath (5):
> OMAP:board-omap3evm: Change TWL related gpio API's to gpio*_cansleep
> OMAP3EVM: Add vio regulator supply required for ads7846 TSC driver
> AM/DM37x: DSS mux configuration for >Rev-B processor cards
This one doesn't apply without fuzz.
> OMAP3EVM: Made backlight GPIO default state to off
> OMAP3EVM: Set TSC wakeup option in pad config
And this one doesn't apply as it seems to apply on top of code that
doesn't exist upstream.
Kevin
^ permalink raw reply
* HIGHMEM is broken when working in SMP V6 mode
From: Nicolas Pitre @ 2011-01-27 18:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20110127173716.GA605@n2100.arm.linux.org.uk>
On Thu, 27 Jan 2011, Russell King - ARM Linux wrote:
> On Mon, Jan 24, 2011 at 02:58:07PM -0500, Nicolas Pitre wrote:
> > /*
> > + * The reason for kmap_high_get() is to ensure that the currently kmap'd
> > + * page usage count does not decrease to zero while we're using its
> > + * existing virtual mapping in an atomic context. With a VIVT cache this
> > + * is essential to do, but with a VIPT cache this is only an optimization
> > + * so not to pay the price of establishing a second mapping if an existing
> > + * one can be used. However, on platforms without hardware TLB maintainence
> > + * broadcast, we simply cannot use ARCH_NEEDS_KMAP_HIGH_GET at all since
> > + * the locking involved must also disable IRQs which is incompatible with
> > + * the IPI mechanism used by global TLB operations.
> > + */
> > +#define ARCH_NEEDS_KMAP_HIGH_GET
> > +#if defined(CONFIG_SMP) && defined(CONFIG_CPU_TLB_V6)
> > +#undef ARCH_NEEDS_KMAP_HIGH_GET
> > +#if defined(CONFIG_HIGHMEM) && defined(CONFIG_CPU_CACHE_VIVT)
> > +#error "The sum of feature in your kernel config cannot be supported together"
> > +#endif
>
> This is wrong. Take a moment to consider a kernel supporting an ARMv6
> VIPT aliasing cache CPU and ARMv7 SMP. Don't we need kmap_high_get()
> for ARMv6 VIPT aliasing cache?
We don't support highmem on aliasing VIPT. Highmem gets disabled at run
time on aliasing VIPT platforms.
Nicolas
^ permalink raw reply
* [PATCH] OMAP2/3: PM: remove unnecessary wakeup/sleep dependency clear
From: Kevin Hilman @ 2011-01-27 18:25 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <alpine.DEB.2.00.1101270252010.16671@utopia.booyaka.com>
Paul Walmsley <paul@pwsan.com> writes:
> The OMAP2 and OMAP3 PM code clears clockdomain wakeup and sleep
> dependencies. This is unnecessary after commit
> 6f7f63cc9adf3192e6fcac4e8bed5cc10fd924aa ("OMAP clockdomain:
> initialize clockdomain registers when the clockdomain layer starts")
> which clears these dependencies during clockdomain init.
>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> ---
> Full-chip retention idle entry tested on OMAP35xx Beagleboard.
Also tested on 3630/Zoom3.
Queueing for 2.6.39. Thanks,
Kevin
> arch/arm/mach-omap2/pm24xx.c | 8 +-------
> arch/arm/mach-omap2/pm34xx.c | 15 ---------------
> 2 files changed, 1 insertions(+), 22 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
> index 97feb3a..10f8747 100644
> --- a/arch/arm/mach-omap2/pm24xx.c
> +++ b/arch/arm/mach-omap2/pm24xx.c
> @@ -363,9 +363,6 @@ static const struct platform_suspend_ops __initdata omap_pm_ops;
> /* XXX This function should be shareable between OMAP2xxx and OMAP3 */
> static int __init clkdms_setup(struct clockdomain *clkdm, void *unused)
> {
> - clkdm_clear_all_wkdeps(clkdm);
> - clkdm_clear_all_sleepdeps(clkdm);
> -
> if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO)
> omap2_clkdm_allow_idle(clkdm);
> else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP &&
> @@ -411,10 +408,7 @@ static void __init prcm_setup_regs(void)
> pwrdm_set_next_pwrst(pwrdm, PWRDM_POWER_OFF);
> omap2_clkdm_sleep(gfx_clkdm);
>
> - /*
> - * Clear clockdomain wakeup dependencies and enable
> - * hardware-supervised idle for all clkdms
> - */
> + /* Enable hardware-supervised idle for all clkdms */
> clkdm_for_each(clkdms_setup, NULL);
> clkdm_add_wkdep(mpu_clkdm, wkup_clkdm);
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index a4aa192..0eb9738 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -694,21 +694,6 @@ static void __init prcm_setup_regs(void)
> u32 omap3630_grpsel_uart4_mask = cpu_is_omap3630() ?
> OMAP3630_GRPSEL_UART4_MASK : 0;
>
> -
> - /* XXX Reset all wkdeps. This should be done when initializing
> - * powerdomains */
> - omap2_prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP);
> - omap2_prm_write_mod_reg(0, MPU_MOD, PM_WKDEP);
> - omap2_prm_write_mod_reg(0, OMAP3430_DSS_MOD, PM_WKDEP);
> - omap2_prm_write_mod_reg(0, OMAP3430_NEON_MOD, PM_WKDEP);
> - omap2_prm_write_mod_reg(0, OMAP3430_CAM_MOD, PM_WKDEP);
> - omap2_prm_write_mod_reg(0, OMAP3430_PER_MOD, PM_WKDEP);
> - if (omap_rev() > OMAP3430_REV_ES1_0) {
> - omap2_prm_write_mod_reg(0, OMAP3430ES2_SGX_MOD, PM_WKDEP);
> - omap2_prm_write_mod_reg(0, OMAP3430ES2_USBHOST_MOD, PM_WKDEP);
> - } else
> - omap2_prm_write_mod_reg(0, GFX_MOD, PM_WKDEP);
> -
> /*
> * Enable interface clock autoidle for all modules.
> * Note that in the long run this should be done by clockfw
^ permalink raw reply
* [PATCH 11/14] ARM: v6k: use CPU domain feature if we include support for arch < ARMv6K
From: Catalin Marinas @ 2011-01-27 18:14 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <E1Peuh2-0003Sx-5e@rmk-PC.arm.linux.org.uk>
On 17 January 2011 19:24, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> Rather than turning off CPU domain switching when the build architecture
> includes ARMv6K, thereby causing problems for ARMv6-supporting kernels,
> turn it on when it's required to support a CPU architecture.
(sorry, I'm well behind list messages, didn't reply earlier)
Does it mean that we get domains enabled even for ARMv7 when ARMv6 is
built in the same kernel? The side effect is that user read-only
addresses are writable by the kernel and SWP emulation no longer
works.
--
Catalin
^ permalink raw reply
* [PATCH] omap2+: Fix omap_serial_early_init to work with init_early hook
From: Kevin Hilman @ 2011-01-27 18:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20110125022528.GI13589@atomide.com>
Hi Tony,
Tony Lindgren <tony@atomide.com> writes:
> The new init_early hook happens at the end of setup_arch,
> which is too early for kzalloc. However, there's no need
> to call omap_serial_early_init that early, so fix this
> by setting it up as a core_initcall.
>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
>
Tested-by: Kevin Hilman <khilman@ti.com>
I boot tested these on 3430/n900, 3630/Zoom3 and 4430ES1.0/PAB.
Kevin
> diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
> index 8f47609..5678c33 100644
> --- a/arch/arm/mach-omap2/io.c
> +++ b/arch/arm/mach-omap2/io.c
> @@ -400,8 +400,6 @@ void __init omap2_init_common_infrastructure(void)
> void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0,
> struct omap_sdrc_params *sdrc_cs1)
> {
> - omap_serial_early_init();
> -
> if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
> omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
> _omap2_init_reprogram_sdrc();
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index 302da74..539ec9c 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -655,7 +655,7 @@ static void serial_out_override(struct uart_port *up, int offset, int value)
> }
> #endif
>
> -void __init omap_serial_early_init(void)
> +static int __init omap_serial_early_init(void)
> {
> int i = 0;
>
> @@ -672,7 +672,7 @@ void __init omap_serial_early_init(void)
>
> uart = kzalloc(sizeof(struct omap_uart_state), GFP_KERNEL);
> if (WARN_ON(!uart))
> - return;
> + return -ENODEV;
>
> uart->oh = oh;
> uart->num = i++;
> @@ -691,7 +691,10 @@ void __init omap_serial_early_init(void)
> */
> uart->oh->flags |= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET;
> } while (1);
> +
> + return 0;
> }
> +core_initcall(omap_serial_early_init);
>
> /**
> * omap_serial_init_port() - initialize single serial port
> diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
> index cec5d56..a1a118d 100644
> --- a/arch/arm/plat-omap/include/plat/serial.h
> +++ b/arch/arm/plat-omap/include/plat/serial.h
> @@ -96,7 +96,6 @@
>
> struct omap_board_data;
>
> -extern void __init omap_serial_early_init(void);
> extern void omap_serial_init(void);
> extern void omap_serial_init_port(struct omap_board_data *bdata);
> extern int omap_uart_can_sleep(void);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH] ARM: map ATAGs when not in first 1MB of RAM
From: Russell King - ARM Linux @ 2011-01-27 17:46 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4D41AE4A.1000105@gmail.com>
On Thu, Jan 27, 2011 at 11:41:30AM -0600, Rob Herring wrote:
> Russell,
>
> On 01/27/2011 10:31 AM, Russell King - ARM Linux wrote:
>> On Thu, Jan 27, 2011 at 09:50:43AM -0600, Rob Herring wrote:
>>> + /*
>>> + * Otherwise map the 1MB region r2 points to (atags or dtb)
>>> + */
>>> +1: mov r0, r2, lsr #20
>>> + mov r0, r0, lsl #20
>>> + sub r3, r0, #(PHYS_OFFSET& 0xff000000)
>>> + .if (PHYS_OFFSET& 0x00f00000)
>>> + sub r3, r3, #(PHYS_OFFSET& 0x00f00000)
>>
>> This introduces new PHYS_OFFSET uses which we're trying hard to get
>> rid of. This will need to be reworked.
>
> Yeah, I didn't really like that either. How about this? It's untested.
> It replaces the whole section mapping the 1st 1MB and should make
> replacing this instance of PHYS_OFFSET with a variable easier.
With the p2v patches, queued for the next merge window, PHYS_OFFSET
becomes:
extern unsigned long __pv_phys_offset;
#define PHYS_OFFSET __pv_phys_offset
so using PHYS_OFFSET in any way in assembly isn't going to work too
well. Luckily, the p2v patches supply __create_page_tables with a
value of PHYS_OFFSET in r8.
What this means is that there's an fundamental interdependence between
your patches and mine. Your patches can work without the p2v patches.
Or they can be made to work with the p2v patches applied.
So I think this needs to wait until after the next merge window, or it
needs to be prepared against the p2v patches (see my p2v branch) and
applied there once everyone's happy with it.
^ permalink raw reply
* [PATCH] ARM: map ATAGs when not in first 1MB of RAM
From: Rob Herring @ 2011-01-27 17:41 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20110127163149.GF25968@n2100.arm.linux.org.uk>
Russell,
On 01/27/2011 10:31 AM, Russell King - ARM Linux wrote:
> On Thu, Jan 27, 2011 at 09:50:43AM -0600, Rob Herring wrote:
>> + /*
>> + * Otherwise map the 1MB region r2 points to (atags or dtb)
>> + */
>> +1: mov r0, r2, lsr #20
>> + mov r0, r0, lsl #20
>> + sub r3, r0, #(PHYS_OFFSET& 0xff000000)
>> + .if (PHYS_OFFSET& 0x00f00000)
>> + sub r3, r3, #(PHYS_OFFSET& 0x00f00000)
>
> This introduces new PHYS_OFFSET uses which we're trying hard to get
> rid of. This will need to be reworked.
Yeah, I didn't really like that either. How about this? It's untested.
It replaces the whole section mapping the 1st 1MB and should make
replacing this instance of PHYS_OFFSET with a variable easier.
/*
* Then map boot params address in r2 or
* the first 1MB of ram if boot params address is not specified.
*/
ldr r3, =PHYS_OFFSET
mov r0, r2, lsr #20
movs r0, r0, lsl #20
moveq r0, r3
sub r3, r0, r3
add r3, r3, #PAGE_OFFSET
add r3, r4, r3, lsr #18
orr r6, r7, r0
str r6, [r3]
Rob
^ permalink raw reply
* HIGHMEM is broken when working in SMP V6 mode
From: Russell King - ARM Linux @ 2011-01-27 17:37 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <alpine.LFD.2.00.1101241010580.8580@xanadu.home>
On Mon, Jan 24, 2011 at 02:58:07PM -0500, Nicolas Pitre wrote:
> /*
> + * The reason for kmap_high_get() is to ensure that the currently kmap'd
> + * page usage count does not decrease to zero while we're using its
> + * existing virtual mapping in an atomic context. With a VIVT cache this
> + * is essential to do, but with a VIPT cache this is only an optimization
> + * so not to pay the price of establishing a second mapping if an existing
> + * one can be used. However, on platforms without hardware TLB maintainence
> + * broadcast, we simply cannot use ARCH_NEEDS_KMAP_HIGH_GET at all since
> + * the locking involved must also disable IRQs which is incompatible with
> + * the IPI mechanism used by global TLB operations.
> + */
> +#define ARCH_NEEDS_KMAP_HIGH_GET
> +#if defined(CONFIG_SMP) && defined(CONFIG_CPU_TLB_V6)
> +#undef ARCH_NEEDS_KMAP_HIGH_GET
> +#if defined(CONFIG_HIGHMEM) && defined(CONFIG_CPU_CACHE_VIVT)
> +#error "The sum of feature in your kernel config cannot be supported together"
> +#endif
This is wrong. Take a moment to consider a kernel supporting an ARMv6
VIPT aliasing cache CPU and ARMv7 SMP. Don't we need kmap_high_get()
for ARMv6 VIPT aliasing cache?
The effect of this is that dma_cache_maint_page() will create new mappings
which could be have the wrong colour - and therefore the subsequent cache
maintainence will not have the desired effect.
I think this may break OMAP.
^ permalink raw reply
* [PATCH] ARM: i.MX23/28: Add pwm driver
From: Wolfram Sang @ 2011-01-27 17:29 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20110127114828.GW9041@pengutronix.de>
Hi Sascha,
just a few minor questions...
On Thu, Jan 27, 2011 at 12:48:28PM +0100, Sascha Hauer wrote:
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> arch/arm/mach-mxs/Kconfig | 2 +
> arch/arm/mach-mxs/Makefile | 2 +
> arch/arm/mach-mxs/clock-mx23.c | 6 +-
> arch/arm/mach-mxs/clock-mx28.c | 9 +-
> arch/arm/mach-mxs/devices-mx23.h | 3 +
> arch/arm/mach-mxs/devices-mx28.h | 3 +
> arch/arm/mach-mxs/devices/Kconfig | 4 +
> arch/arm/mach-mxs/devices/Makefile | 1 +
> arch/arm/mach-mxs/devices/platform-pwm.c | 25 ++
> arch/arm/mach-mxs/include/mach/devices-common.h | 5 +
> arch/arm/mach-mxs/pwm.c | 318 +++++++++++++++++++++++
> 11 files changed, 376 insertions(+), 2 deletions(-)
> create mode 100644 arch/arm/mach-mxs/devices/platform-pwm.c
> create mode 100644 arch/arm/mach-mxs/pwm.c
>
> diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
> index cd2fbdf..99813e0 100644
> --- a/arch/arm/mach-mxs/Kconfig
> +++ b/arch/arm/mach-mxs/Kconfig
> @@ -8,10 +8,12 @@ config MXS_OCOTP
> config SOC_IMX23
> bool
> select CPU_ARM926T
> + select HAVE_PWM
>
> config SOC_IMX28
> bool
> select CPU_ARM926T
> + select HAVE_PWM
>
> comment "MXS platforms:"
>
> diff --git a/arch/arm/mach-mxs/Makefile b/arch/arm/mach-mxs/Makefile
> index 6b26f02..5c7ce1f 100644
> --- a/arch/arm/mach-mxs/Makefile
> +++ b/arch/arm/mach-mxs/Makefile
> @@ -7,6 +7,8 @@ obj-$(CONFIG_PM) += pm.o
> obj-$(CONFIG_SOC_IMX23) += clock-mx23.o mm-mx23.o
> obj-$(CONFIG_SOC_IMX28) += clock-mx28.o mm-mx28.o
>
> +obj-$(CONFIG_MXS_HAVE_PLATFORM_PWM) += pwm.o
> +
> obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o
> obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o
>
> diff --git a/arch/arm/mach-mxs/clock-mx23.c b/arch/arm/mach-mxs/clock-mx23.c
> index b1a362e..017d4a3 100644
> --- a/arch/arm/mach-mxs/clock-mx23.c
> +++ b/arch/arm/mach-mxs/clock-mx23.c
> @@ -446,7 +446,11 @@ static struct clk_lookup lookups[] = {
> _REGISTER_CLOCK(NULL, "hclk", hbus_clk)
> _REGISTER_CLOCK(NULL, "usb", usb_clk)
> _REGISTER_CLOCK(NULL, "audio", audio_clk)
> - _REGISTER_CLOCK(NULL, "pwm", pwm_clk)
> + _REGISTER_CLOCK("mxs-pwm.0", NULL, pwm_clk)
> + _REGISTER_CLOCK("mxs-pwm.1", NULL, pwm_clk)
> + _REGISTER_CLOCK("mxs-pwm.2", NULL, pwm_clk)
> + _REGISTER_CLOCK("mxs-pwm.3", NULL, pwm_clk)
> + _REGISTER_CLOCK("mxs-pwm.4", NULL, pwm_clk)
> };
>
> static int clk_misc_init(void)
> diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c
> index 2f1a990..4b48b0a 100644
> --- a/arch/arm/mach-mxs/clock-mx28.c
> +++ b/arch/arm/mach-mxs/clock-mx28.c
> @@ -623,7 +623,14 @@ static struct clk_lookup lookups[] = {
> _REGISTER_CLOCK(NULL, "can1", can1_clk)
> _REGISTER_CLOCK(NULL, "usb0", usb0_clk)
> _REGISTER_CLOCK(NULL, "usb1", usb1_clk)
> - _REGISTER_CLOCK(NULL, "pwm", pwm_clk)
> + _REGISTER_CLOCK("mxs-pwm.0", NULL, pwm_clk)
> + _REGISTER_CLOCK("mxs-pwm.1", NULL, pwm_clk)
> + _REGISTER_CLOCK("mxs-pwm.2", NULL, pwm_clk)
> + _REGISTER_CLOCK("mxs-pwm.3", NULL, pwm_clk)
> + _REGISTER_CLOCK("mxs-pwm.4", NULL, pwm_clk)
> + _REGISTER_CLOCK("mxs-pwm.5", NULL, pwm_clk)
> + _REGISTER_CLOCK("mxs-pwm.6", NULL, pwm_clk)
> + _REGISTER_CLOCK("mxs-pwm.7", NULL, pwm_clk)
> _REGISTER_CLOCK(NULL, "lradc", lradc_clk)
> _REGISTER_CLOCK(NULL, "spdif", spdif_clk)
> };
> diff --git a/arch/arm/mach-mxs/devices-mx23.h b/arch/arm/mach-mxs/devices-mx23.h
> index 1256788..fb9def8 100644
> --- a/arch/arm/mach-mxs/devices-mx23.h
> +++ b/arch/arm/mach-mxs/devices-mx23.h
> @@ -14,3 +14,6 @@
> extern const struct amba_device mx23_duart_device __initconst;
> #define mx23_add_duart() \
> mxs_add_duart(&mx23_duart_device)
> +
> +#define mx23_add_pwm(id) mxs_add_pwm(MX23_PWM_BASE_ADDR, pdata)
> +
> diff --git a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h
> index 1ab7bf0..6927250 100644
> --- a/arch/arm/mach-mxs/devices-mx28.h
> +++ b/arch/arm/mach-mxs/devices-mx28.h
> @@ -26,3 +26,6 @@ extern const struct mxs_auart_data mx28_auart_data[] __initconst;
> extern const struct mxs_fec_data mx28_fec_data[] __initconst;
> #define mx28_add_fec(id, pdata) \
> mxs_add_fec(&mx28_fec_data[id], pdata)
> +
> +#define mx28_add_pwm(id) mxs_add_pwm(MX28_PWM_BASE_ADDR, id)
> +
> diff --git a/arch/arm/mach-mxs/devices/Kconfig b/arch/arm/mach-mxs/devices/Kconfig
> index 3001b75..f8599e5 100644
> --- a/arch/arm/mach-mxs/devices/Kconfig
> +++ b/arch/arm/mach-mxs/devices/Kconfig
> @@ -7,3 +7,7 @@ config MXS_HAVE_PLATFORM_AUART
>
> config MXS_HAVE_PLATFORM_FEC
> bool
> +
> +config MXS_HAVE_PLATFORM_PWM
> + bool
> +
> diff --git a/arch/arm/mach-mxs/devices/Makefile b/arch/arm/mach-mxs/devices/Makefile
> index c814d05..cdb026e 100644
> --- a/arch/arm/mach-mxs/devices/Makefile
> +++ b/arch/arm/mach-mxs/devices/Makefile
> @@ -1,3 +1,4 @@
> obj-$(CONFIG_MXS_HAVE_AMBA_DUART) += amba-duart.o
> obj-$(CONFIG_MXS_HAVE_PLATFORM_AUART) += platform-auart.o
> obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o
> +obj-$(CONFIG_MXS_HAVE_PLATFORM_PWM) += platform-pwm.o
> diff --git a/arch/arm/mach-mxs/devices/platform-pwm.c b/arch/arm/mach-mxs/devices/platform-pwm.c
> new file mode 100644
> index 0000000..2f1f549
> --- /dev/null
> +++ b/arch/arm/mach-mxs/devices/platform-pwm.c
> @@ -0,0 +1,25 @@
> +/*
> + * Copyright (C) 2010 Pengutronix
2011?
> + * Sascha Hauer <s.hauer@pengutronix.de>
> + *
> + * 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.
> + */
> +#include <asm/sizes.h>
> +#include <mach/mx23.h>
> +#include <mach/mx28.h>
> +#include <mach/devices-common.h>
> +
> +struct platform_device *__init mxs_add_pwm(resource_size_t iobase, int id)
> +{
> + struct resource res = {
> + .flags = IORESOURCE_MEM,
> + };
> +
> + res.start = iobase + 0x10 + 0x20 * id;
> + res.end = res.start + 0x1f;
> +
> + return mxs_add_platform_device("mxs-pwm", id, &res, 1, NULL, 0);
> +}
> +
> diff --git a/arch/arm/mach-mxs/include/mach/devices-common.h b/arch/arm/mach-mxs/include/mach/devices-common.h
> index bed4002..82d5311 100644
> --- a/arch/arm/mach-mxs/include/mach/devices-common.h
> +++ b/arch/arm/mach-mxs/include/mach/devices-common.h
> @@ -51,3 +51,8 @@ struct mxs_fec_data {
> struct platform_device *__init mxs_add_fec(
> const struct mxs_fec_data *data,
> const struct fec_platform_data *pdata);
> +
> +/* pwm */
> +struct platform_device *__init mxs_add_pwm(
> + resource_size_t iobase, int id);
> +
> diff --git a/arch/arm/mach-mxs/pwm.c b/arch/arm/mach-mxs/pwm.c
> new file mode 100644
> index 0000000..f2c83a6
> --- /dev/null
> +++ b/arch/arm/mach-mxs/pwm.c
> @@ -0,0 +1,318 @@
> +/*
> + * Copyright (C) 2010 Pengutronix
2011?
> + * Sascha Hauer <s.hauer@pengutronix.de>
> + *
> + * simple driver for PWM (Pulse Width Modulator) controller
> + *
> + * 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.
> + *
> + * Derived from pxa PWM driver by eric miao <eric.miao@marvell.com>
> + */
> +
> +#include <linux/module.h>
> +#include <linux/kernel.h>
> +#include <linux/platform_device.h>
> +#include <linux/slab.h>
> +#include <linux/err.h>
> +#include <linux/clk.h>
> +#include <linux/delay.h>
> +#include <linux/io.h>
> +#include <linux/pwm.h>
> +#include <mach/hardware.h>
> +#include <mach/mxs.h>
> +#include <mach/mx23.h>
> +#include <mach/mx28.h>
> +#include <asm/div64.h>
> +
> +struct pwm_device {
> + struct list_head node;
> + struct device *dev;
> +
> + const char *label;
> + struct clk *clk;
> +
> + int enabled;
> + void __iomem *mmio_base;
> +
> + unsigned int use_count;
> + unsigned int pwm_id;
> +
> + u32 val_active;
> + u32 val_period;
> + int period_us;
> +};
> +
> +/* common register space */
> +static void __iomem *pwm_base_common;
> +#define REG_PWM_CTRL 0x0
> +#define PWM_SFTRST (1 << 31)
> +#define PWM_CLKGATE (1 << 30)
> +#define PWM_ENABLE(p) (1 << (p))
> +
> +/* per pwm register space */
> +#define REG_ACTIVE 0x0
> +#define REG_PERIOD 0x10
> +
> +#define PERIOD_PERIOD(p) ((p) & 0xffff)
> +#define PERIOD_ACTIVE_HIGH (3 << 16)
> +#define PERIOD_INACTIVE_LOW (2 << 18)
> +#define PERIOD_CDIV(div) (((div) & 0x7) << 20)
> +
> +static void pwm_update(struct pwm_device *pwm)
> +{
> + writel(pwm->val_active, pwm->mmio_base + REG_ACTIVE);
> + writel(pwm->val_period, pwm->mmio_base + REG_PERIOD);
> +}
> +
> +int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
> +{
> + int div = 0;
> + unsigned long rate;
> + unsigned long long c;
> + unsigned long period_cycles, duty_cycles;
> +
> + if (pwm == NULL || period_ns == 0 || duty_ns > period_ns)
> + return -EINVAL;
> +
> + rate = clk_get_rate(pwm->clk);
> +
> + dev_dbg(pwm->dev, "config: duty_ns: %d, period_ns: %d (clkrate %ld)\n",
> + duty_ns, period_ns, rate);
> +
> + while (1) {
> + c = rate / (1 << div);
> + c = c * period_ns;
> + do_div(c, 1000000000);
> + if (c < 0x10000)
> + break;
> + div++;
> +
> + if (div > 8)
> + return -EINVAL;
> + }
> +
> + period_cycles = c;
> + duty_cycles = period_cycles * duty_ns / period_ns;
> +
> + dev_dbg(pwm->dev, "config period_cycles: %ld duty_cycles: %ld\n",
> + period_cycles, duty_cycles);
> +
> + pwm->val_active = period_cycles << 16 | duty_cycles;
> + pwm->val_period = PERIOD_PERIOD(period_cycles) | PERIOD_ACTIVE_HIGH |
> + PERIOD_INACTIVE_LOW | PERIOD_CDIV(div);
> + pwm->period_us = period_ns / 1000;
> +
> + pwm_update(pwm);
> +
> + return 0;
> +}
> +EXPORT_SYMBOL(pwm_config);
> +
> +static void __pwm_enable(struct pwm_device *pwm, int enable)
> +{
> + if (enable)
> + __mxs_setl(PWM_ENABLE(pwm->pwm_id), pwm_base_common + REG_PWM_CTRL);
> + else
> + __mxs_clrl(PWM_ENABLE(pwm->pwm_id), pwm_base_common + REG_PWM_CTRL);
> +}
> +
> +int pwm_enable(struct pwm_device *pwm)
> +{
> + int rc = 0;
> +
> + dev_dbg(pwm->dev, "enable\n");
> +
> + if (!pwm->enabled) {
> + rc = clk_enable(pwm->clk);
> + if (!rc) {
> + pwm->enabled = 1;
> + __pwm_enable(pwm, 1);
> + pwm_update(pwm);
> + }
> + }
> + return rc;
> +}
> +EXPORT_SYMBOL(pwm_enable);
> +
> +void pwm_disable(struct pwm_device *pwm)
> +{
> + dev_dbg(pwm->dev, "disable\n");
> +
> + if (pwm->enabled) {
> + /*
> + * We need a little delay here, it takes one period for
> + * the last pwm_config call to take effect. If we disable
> + * the pwm too early it just freezes the current output
> + * state.
> + */
> + usleep_range(pwm->period_us, pwm->period_us * 2);
> + __pwm_enable(pwm, 0);
> + clk_disable(pwm->clk);
> + pwm->enabled = 0;
> + }
> +}
> +EXPORT_SYMBOL(pwm_disable);
> +
> +static DEFINE_MUTEX(pwm_lock);
> +static LIST_HEAD(pwm_list);
> +
> +struct pwm_device *pwm_request(int pwm_id, const char *label)
> +{
> + struct pwm_device *pwm;
> + int found = 0;
> +
> + mutex_lock(&pwm_lock);
> +
> + list_for_each_entry(pwm, &pwm_list, node) {
> + if (pwm->pwm_id == pwm_id) {
> + found = 1;
> + break;
> + }
> + }
> +
> + if (found) {
> + if (pwm->use_count == 0) {
> + pwm->use_count++;
> + pwm->label = label;
> + } else
> + pwm = ERR_PTR(-EBUSY);
> + } else
> + pwm = ERR_PTR(-ENOENT);
else branches should have braces because if-block has, too
> +
> + mutex_unlock(&pwm_lock);
> +
> + return pwm;
> +}
> +EXPORT_SYMBOL(pwm_request);
> +
> +void pwm_free(struct pwm_device *pwm)
> +{
> + mutex_lock(&pwm_lock);
> +
> + if (pwm->use_count) {
> + pwm->use_count--;
> + pwm->label = NULL;
> + } else
> + pr_warning("PWM device already freed\n");
dev_warning?
> +
> + mutex_unlock(&pwm_lock);
> +}
> +EXPORT_SYMBOL(pwm_free);
> +
> +static int __devinit mxs_pwm_probe(struct platform_device *pdev)
> +{
> + struct pwm_device *pwm;
> + struct resource *r;
> + int ret = 0;
> +
> + pwm = kzalloc(sizeof(struct pwm_device), GFP_KERNEL);
> + if (pwm == NULL) {
> + dev_err(&pdev->dev, "failed to allocate memory\n");
> + return -ENOMEM;
> + }
Turn into a managed device(devm_*)?
> +
> + pwm->clk = clk_get(&pdev->dev, NULL);
> +
> + if (IS_ERR(pwm->clk)) {
> + ret = PTR_ERR(pwm->clk);
> + goto err_free;
> + }
> +
> + pwm->enabled = 0;
> +
> + pwm->use_count = 0;
> + pwm->pwm_id = pdev->id;
> + pwm->dev = &pdev->dev;
> +
> + r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + if (r == NULL) {
> + dev_err(&pdev->dev, "no memory resource defined\n");
> + ret = -ENODEV;
> + goto err_free_clk;
> + }
> +
> + r = request_mem_region(r->start, resource_size(r), pdev->name);
> + if (r == NULL) {
> + dev_err(&pdev->dev, "failed to request memory resource\n");
> + ret = -EBUSY;
> + goto err_free_clk;
> + }
> +
> + pwm->mmio_base = ioremap(r->start, resource_size(r));
> + if (pwm->mmio_base == NULL) {
> + dev_err(&pdev->dev, "failed to ioremap() registers\n");
> + ret = -ENODEV;
> + goto err_free_mem;
> + }
> +
> + mutex_lock(&pwm_lock);
> + list_add_tail(&pwm->node, &pwm_list);
> + mutex_unlock(&pwm_lock);
> +
> + platform_set_drvdata(pdev, pwm);
> + return 0;
> +
> +err_free_mem:
> + release_mem_region(r->start, resource_size(r));
> +err_free_clk:
> + clk_put(pwm->clk);
> +err_free:
> + kfree(pwm);
> + return ret;
> +}
> +
> +static int __devexit mxs_pwm_remove(struct platform_device *pdev)
> +{
> + struct pwm_device *pwm;
> + struct resource *r;
> +
> + pwm = platform_get_drvdata(pdev);
> + if (pwm == NULL)
> + return -ENODEV;
> +
> + mutex_lock(&pwm_lock);
> + list_del(&pwm->node);
> + mutex_unlock(&pwm_lock);
> +
> + iounmap(pwm->mmio_base);
> +
> + r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + release_mem_region(r->start, resource_size(r));
> +
> + clk_put(pwm->clk);
> +
> + kfree(pwm);
> + return 0;
> +}
> +
> +static struct platform_driver mxs_pwm_driver = {
> + .driver = {
> + .name = "mxs-pwm",
> + },
> + .probe = mxs_pwm_probe,
> + .remove = __devexit_p(mxs_pwm_remove),
> +};
> +
> +static int __init mxs_pwm_init(void)
> +{
> + if (cpu_is_mx28())
> + pwm_base_common = MX28_IO_ADDRESS(MX28_PWM_BASE_ADDR);
> + else
> + pwm_base_common = MX23_IO_ADDRESS(MX23_PWM_BASE_ADDR);
> +
> + __mxs_clrl(PWM_SFTRST | PWM_CLKGATE, pwm_base_common + REG_PWM_CTRL);
> +
> + return platform_driver_register(&mxs_pwm_driver);
> +}
> +arch_initcall(mxs_pwm_init);
> +
> +static void __exit mxs_pwm_exit(void)
> +{
> + platform_driver_unregister(&mxs_pwm_driver);
> +}
> +module_exit(mxs_pwm_exit);
> +
> +MODULE_LICENSE("GPL v2");
> +MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
> --
> 1.7.2.3
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110127/86353250/attachment.sig>
^ permalink raw reply
* some i.MX23/28 patches
From: Wolfram Sang @ 2011-01-27 17:13 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1296128413-20778-1-git-send-email-s.hauer@pengutronix.de>
On Thu, Jan 27, 2011 at 12:40:09PM +0100, Sascha Hauer wrote:
> The following contains some i.MX23/28 cleanup patches.
All
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110127/eb333fa7/attachment.sig>
^ permalink raw reply
* [PATCH] scoop.c: use resource_size()
From: H Hartley Sweeten @ 2011-01-27 17:11 UTC (permalink / raw)
To: linux-arm-kernel
Use resource_size() instead of calculating the size by hand.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
---
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
index c11af1e..a07b0e7 100644
--- a/arch/arm/common/scoop.c
+++ b/arch/arm/common/scoop.c
@@ -193,7 +193,7 @@ static int __devinit scoop_probe(struct platform_device *pdev)
spin_lock_init(&devptr->scoop_lock);
inf = pdev->dev.platform_data;
- devptr->base = ioremap(mem->start, mem->end - mem->start + 1);
+ devptr->base = ioremap(mem->start, resource_size(mem));
if (!devptr->base) {
ret = -ENOMEM;
^ permalink raw reply related
* [PATCH] ARM: mach-mx3/mach-mx31_3ds: Remove unnecessary function for IO mapping
From: Fabio Estevam @ 2011-01-27 17:00 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
arch/arm/mach-mx3/mach-mx31_3ds.c | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 0d65db8..2f41430 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -320,14 +320,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS,
};
-/*
- * Set up static virtual mappings.
- */
-static void __init mx31_3ds_map_io(void)
-{
- mx31_map_io();
-}
-
/*!
* Board specific initialization.
*/
@@ -382,7 +374,7 @@ static struct sys_timer mx31_3ds_timer = {
MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
/* Maintainer: Freescale Semiconductor, Inc. */
.boot_params = MX3x_PHYS_OFFSET + 0x100,
- .map_io = mx31_3ds_map_io,
+ .map_io = mx31_map_io,
.init_irq = mx31_init_irq,
.init_machine = mxc_board_init,
.timer = &mx31_3ds_timer,
--
1.6.0.4
^ permalink raw reply related
* [PATCH] mmci: calculate remaining bytes at error correctly
From: Russell King - ARM Linux @ 2011-01-27 16:47 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <AANLkTin7BEP0kpYGKyCczXY+MRG=GQ5_WgD3duDtemZ-@mail.gmail.com>
On Thu, Jan 27, 2011 at 05:43:35PM +0100, Linus Walleij wrote:
> 2011/1/27 Russell King - ARM Linux <linux@arm.linux.org.uk>:
>
> > So, maybe we want:
> >
> > ? ? ? ?host->data_xfered = ((success - 1) / data->blksz) * data->blksz;
> >
> > instead?
>
> So like this:
Yes, that looks right, and shouldn't ever underflow.
^ permalink raw reply
* [PATCH v2] ARM: Avoid discarding sections that might have SMP_ON_UP fixups SMP_ON_UP fixups
From: Russell King - ARM Linux @ 2011-01-27 16:46 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20110127143709.GA13735@arm.com>
On Thu, Jan 27, 2011 at 02:37:09PM +0000, Dave Martin wrote:
> On Wed, Jan 26, 2011 at 04:31:37PM -0500, Nicolas Pitre wrote:
> > Since discarded sections are by definition not used, we should at least
> > put them into the .init section so to discard them at run time. And
> > only the EXIT_TEXT and EXIT_DATA would need to be kept (see x86 for
> > example).
> >
> >
> > Nicolas
>
> I'll check up on whether we need to care about writable data.
> For now I've just attempted to move stuff to .init.
You can keep the discarding of the unwind data for exit sections as
the exit sections don't depend on the unwind data.
It's all to do with sections being referenced from other sections. If
a section being kept references a section being discarded, then the
linker will error out. You need to keep any section that is being
referenced - but you don't need to keep sections which only reference
those being kept.
I'd also prefer to see a 'KEEP_EXIT' macro as I think we can discard
these sections in more cases than just SMP_ON_UP. I think it's:
SMP_ON_UP && !DEBUG_SPINLOCK
which requires it. So if you have spinlock debugging enabled you can
discard the exit sections. See include/linux/spinlock.h.
^ permalink raw reply
* [PATCH] ep93xx: add framebuffer support to edb93xx boards
From: H Hartley Sweeten @ 2011-01-27 16:43 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <AANLkTi=SDZ7EAw5Q=XAD3WtutwCHSgfiw-qQ5z4TcYCS@mail.gmail.com>
On Wednesday, January 26, 2011 10:29 PM, Martin Guy wrote:
> On 7 January 2011 23:38, H Hartley Sweeten <hartleys@visionengravers.com> wrote:
>> The ep9307, ep9312, and ep9315 variants of the ep93xx processor include the
>> raster engine needed for framebuffer support.
>>
>> This allows the EDB93xx boards with those processors to use the framebuffer
>> driver.
>>
>> Tested on an EDB9307A with the following kernel parameters:
>> ? ? ? ?video=640x480-16 at 60
>> ? ? ? ?video=1024x768-16 at 60
>
> Hi. Sorry, I've been out of action for personal reasons.
>
> I don't have an edb to test this, but suggest you compare with the
> simone.c board file, which has similar code to enable the fb.
> Compared to the mainline code in 2.6.36, I use just one patch, which
> defines the working video modes. I attach it for reference.
The edb boards _are_ development boards, as such I really don't wish to limit the
modes that the framebuffer can be used with.
It's really up to the end user if the "twitching" at higher resolutions is an
issue. For the dev boards I don't want to enforce any limitations.
Thanks,
Hartley
^ permalink raw reply
* [PATCH] mmci: calculate remaining bytes at error correctly
From: Linus Walleij @ 2011-01-27 16:43 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20110127163643.GG25968@n2100.arm.linux.org.uk>
2011/1/27 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> So, maybe we want:
>
> ? ? ? ?host->data_xfered = ((success - 1) / data->blksz) * data->blksz;
>
> instead?
So like this:
^ permalink raw reply
* [PATCH] mmci: calculate remaining bytes at error correctly
From: Russell King - ARM Linux @ 2011-01-27 16:36 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1296137666-30906-1-git-send-email-linus.walleij@stericsson.com>
On Thu, Jan 27, 2011 at 03:14:26PM +0100, Linus Walleij wrote:
> The MMCIDATACNT register contain the number of byte left at error
> not the number of words, so loose the << 2 thing. Further if CRC
> fails on the first block, we may end up with a negative number
> of transferred bytes which is not good, and the formula was in
> wrong order.
Hmm.
In order to have a CRC error, you must have transferred one block through
the FIFO. We might read the data counter before one block has been fully
transferred.
So, maybe we want:
host->data_xfered = ((success - 1) / data->blksz) * data->blksz;
instead?
^ permalink raw reply
* [PATCH] ARM: map ATAGs when not in first 1MB of RAM
From: Russell King - ARM Linux @ 2011-01-27 16:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1296143443-9442-1-git-send-email-robherring2@gmail.com>
On Thu, Jan 27, 2011 at 09:50:43AM -0600, Rob Herring wrote:
> + /*
> + * Otherwise map the 1MB region r2 points to (atags or dtb)
> + */
> +1: mov r0, r2, lsr #20
> + mov r0, r0, lsl #20
> + sub r3, r0, #(PHYS_OFFSET & 0xff000000)
> + .if (PHYS_OFFSET & 0x00f00000)
> + sub r3, r3, #(PHYS_OFFSET & 0x00f00000)
This introduces new PHYS_OFFSET uses which we're trying hard to get
rid of. This will need to be reworked.
^ permalink raw reply
* [PATCH] ARM: map ATAGs when not in first 1MB of RAM
From: Rob Herring @ 2011-01-27 15:50 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
If ATAGs or DTB pointer is not within first 1MB of RAM, then the boot params
will not be mapped early enough, so map the 1MB region that r2 points to. Only
map the first 1MB when r2 is 0.
Some assembly improvements from Nicolas Pitre.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/kernel/head.S | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 65d9489..9c688bf 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -205,15 +205,32 @@ __create_page_tables:
#endif
/*
- * Then map first 1MB of ram in case it contains our boot params.
+ * Then map first 1MB of ram if boot params address is not specified.
*/
+ cmp r2, #0
+ bne 1f
add r0, r4, #PAGE_OFFSET >> 18
orr r6, r7, #(PHYS_OFFSET & 0xff000000)
.if (PHYS_OFFSET & 0x00f00000)
orr r6, r6, #(PHYS_OFFSET & 0x00f00000)
.endif
str r6, [r0]
+ b 2f
+ /*
+ * Otherwise map the 1MB region r2 points to (atags or dtb)
+ */
+1: mov r0, r2, lsr #20
+ mov r0, r0, lsl #20
+ sub r3, r0, #(PHYS_OFFSET & 0xff000000)
+ .if (PHYS_OFFSET & 0x00f00000)
+ sub r3, r3, #(PHYS_OFFSET & 0x00f00000)
+ .endif
+ add r3, r3, #PAGE_OFFSET
+ add r3, r4, r3, lsr #18
+ orr r6, r7, r0
+ str r6, [r3]
+2:
#ifdef CONFIG_DEBUG_LL
#ifndef CONFIG_DEBUG_ICEDCC
/*
--
1.7.1
^ permalink raw reply related
* [PATCH 1/2] arch/arm/mach-omap2/dma.c: Convert IS_ERR result to PTR_ERR
From: Julia Lawall @ 2011-01-27 15:49 UTC (permalink / raw)
To: linux-arm-kernel
This code elsewhere returns a negative constant to an indicate an error,
while IS_ERR returns the result of a >= operation.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression x;
@@
if (...) { ...
- return IS_ERR(x);
+ return PTR_ERR(x);
}
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
arch/arm/mach-omap2/dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -u -p a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -264,7 +264,7 @@ static int __init omap2_system_dma_init_
if (IS_ERR(od)) {
pr_err("%s: Cant build omap_device for %s:%s.\n",
__func__, name, oh->name);
- return IS_ERR(od);
+ return PTR_ERR(od);
}
mem = platform_get_resource(&od->pdev, IORESOURCE_MEM, 0);
^ permalink raw reply
* [PATCH] MMCI: don't read command response when invalid
From: Chris Ball @ 2011-01-27 15:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20110127121901.GB25968@n2100.arm.linux.org.uk>
Hi Russell,
On Thu, Jan 27, 2011 at 12:19:01PM +0000, Russell King - ARM Linux wrote:
> FYI, I've now merged this into the ARM devel tree for the time being so
> it doesn't get forgotten - which means it'll appear in linux-next at some
> point if it isn't already there. (Mainly so I don't have to keep on
> adding the patch.)
>
> Once you push it into mainline, I'll drop my copy.
Okay. Sent this to Linus yesterday, just waiting for him to pull.
(It's been in linux-next for the last two weeks.)
Thanks,
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox