* [PATCH] flash_setup should only be built when CONFIG_MTD is enabled
@ 2009-04-30 15:48 Florian Fainelli
2009-04-30 15:54 ` David Daney
2009-05-01 13:47 ` Ralf Baechle
0 siblings, 2 replies; 3+ messages in thread
From: Florian Fainelli @ 2009-04-30 15:48 UTC (permalink / raw)
To: linux-mips, Ralf Baechle, David Daney
Building flash_setup while CONFIG_MTD is not enabled does work, but
results in the following oops while booting:
Bootbus flash: Setting flash for 32MB flash at 0x1dc00000
Kernel bug detected[#1]:
Cpu 0
$ 0 : 0000000000000000 0000000000000010 000000000000003d 0000000000000002
$ 4 : 0000000000000001 0000000000000000 ffffffffffffffff 0000000000000d52
$ 8 : 0000000000000d52 000000000000003e 000000000000000a 0000000000000d17
$12 : 0000000000000031 ffffffff81105e2c 00000000f34c39b5 0000000017da5c01
$16 : ffffffff813ab588 ffffffff8138b514 0000000000000001 ffffffff814d2390
$20 : 0000000000000010 0000000000000010 0000000000000000 0000000000000000
$24 : 000000000931a549 ffffffff8110e68c
$28 : a800000007828000 a80000000782bf00 0000000000000000 ffffffff8138b594
Hi : 0000000000000191
Lo : 36978d4fdf254137
epc : ffffffff8138b594 0xffffffff8138b594
Not tainted
ra : ffffffff8138b594 0xffffffff8138b594
Status: 10008ce3 KX SX UX KERNEL EXL IE
Cause : 00800024
PrId : 000d0601 (Cavium Octeon)
Modules linked in:
Process swapper (pid: 1, threadinfo=a800000007828000, task=a800000007825540, tls=0000000000000000)
Stack : ffffffff813ab580 ffffffff8110d918 0000000007885780 ffffffff81385080
ffffffff81385080 ffffffff8116ca10 3135310000000000 0000000000000000
0000000000000098 ffffffff81360000 ffffffff81350000 ffffffff813ab588
ffffffff813ab5d0 ffffffff81350000 ffffffff814d2390 ffffffff813862e8
000000000000ffff 0000000000000000 0000000000000000 0000000000000000
0000000000000000 0000000000000000 0000000000000000 0000000000000000
0000000000000000 ffffffff81114f38 0000000000000000 0000000000000000
0000000000000000 0000000000000000 0000000000000000 0000000000000000
Call Trace:[<ffffffff8110d918>] 0xffffffff8110d918
[<ffffffff8116ca10>] 0xffffffff8116ca10
[<ffffffff813862e8>] 0xffffffff813862e8
[<ffffffff81114f38>] 0xffffffff81114f38
This patch makes flash_setup be compiled only when CONFIG_MTD
which solves issue, the MTD driver then fails to register but this is
less critical.
CC: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/arch/mips/cavium-octeon/Makefile b/arch/mips/cavium-octeon/Makefile
index d6903c3..32bdc81 100644
--- a/arch/mips/cavium-octeon/Makefile
+++ b/arch/mips/cavium-octeon/Makefile
@@ -10,9 +10,10 @@
#
obj-y := setup.o serial.o octeon-irq.o csrc-octeon.o
-obj-y += dma-octeon.o flash_setup.o
+obj-y += dma-octeon.o
obj-y += octeon-memcpy.o
obj-$(CONFIG_SMP) += smp.o
+obj-$(CONFIG_MTD) += flash_setup.o
EXTRA_CFLAGS += -Werror
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] flash_setup should only be built when CONFIG_MTD is enabled
2009-04-30 15:48 [PATCH] flash_setup should only be built when CONFIG_MTD is enabled Florian Fainelli
@ 2009-04-30 15:54 ` David Daney
2009-05-01 13:47 ` Ralf Baechle
1 sibling, 0 replies; 3+ messages in thread
From: David Daney @ 2009-04-30 15:54 UTC (permalink / raw)
To: Florian Fainelli, Ralf Baechle; +Cc: linux-mips
Florian Fainelli wrote:
> This patch makes flash_setup be compiled only when CONFIG_MTD
> which solves issue, the MTD driver then fails to register but this is
> less critical.
>
> CC: David Daney <ddaney@caviumnetworks.com>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: David Daney <ddaney@caviumnetworks.com>
> ---
> diff --git a/arch/mips/cavium-octeon/Makefile b/arch/mips/cavium-octeon/Makefile
> index d6903c3..32bdc81 100644
> --- a/arch/mips/cavium-octeon/Makefile
> +++ b/arch/mips/cavium-octeon/Makefile
> @@ -10,9 +10,10 @@
> #
>
> obj-y := setup.o serial.o octeon-irq.o csrc-octeon.o
> -obj-y += dma-octeon.o flash_setup.o
> +obj-y += dma-octeon.o
> obj-y += octeon-memcpy.o
>
> obj-$(CONFIG_SMP) += smp.o
> +obj-$(CONFIG_MTD) += flash_setup.o
>
> EXTRA_CFLAGS += -Werror
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] flash_setup should only be built when CONFIG_MTD is enabled
2009-04-30 15:48 [PATCH] flash_setup should only be built when CONFIG_MTD is enabled Florian Fainelli
2009-04-30 15:54 ` David Daney
@ 2009-05-01 13:47 ` Ralf Baechle
1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2009-05-01 13:47 UTC (permalink / raw)
To: Florian Fainelli; +Cc: linux-mips, David Daney
On Thu, Apr 30, 2009 at 05:48:51PM +0200, Florian Fainelli wrote:
> Building flash_setup while CONFIG_MTD is not enabled does work, but
> results in the following oops while booting:
>
> Bootbus flash: Setting flash for 32MB flash at 0x1dc00000
> Kernel bug detected[#1]:
> Cpu 0
> $ 0 : 0000000000000000 0000000000000010 000000000000003d 0000000000000002
> $ 4 : 0000000000000001 0000000000000000 ffffffffffffffff 0000000000000d52
> $ 8 : 0000000000000d52 000000000000003e 000000000000000a 0000000000000d17
> $12 : 0000000000000031 ffffffff81105e2c 00000000f34c39b5 0000000017da5c01
> $16 : ffffffff813ab588 ffffffff8138b514 0000000000000001 ffffffff814d2390
> $20 : 0000000000000010 0000000000000010 0000000000000000 0000000000000000
> $24 : 000000000931a549 ffffffff8110e68c
> $28 : a800000007828000 a80000000782bf00 0000000000000000 ffffffff8138b594
> Hi : 0000000000000191
> Lo : 36978d4fdf254137
> epc : ffffffff8138b594 0xffffffff8138b594
> Not tainted
> ra : ffffffff8138b594 0xffffffff8138b594
> Status: 10008ce3 KX SX UX KERNEL EXL IE
> Cause : 00800024
> PrId : 000d0601 (Cavium Octeon)
> Modules linked in:
> Process swapper (pid: 1, threadinfo=a800000007828000, task=a800000007825540, tls=0000000000000000)
> Stack : ffffffff813ab580 ffffffff8110d918 0000000007885780 ffffffff81385080
> ffffffff81385080 ffffffff8116ca10 3135310000000000 0000000000000000
> 0000000000000098 ffffffff81360000 ffffffff81350000 ffffffff813ab588
> ffffffff813ab5d0 ffffffff81350000 ffffffff814d2390 ffffffff813862e8
> 000000000000ffff 0000000000000000 0000000000000000 0000000000000000
> 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> 0000000000000000 ffffffff81114f38 0000000000000000 0000000000000000
> 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> Call Trace:[<ffffffff8110d918>] 0xffffffff8110d918
> [<ffffffff8116ca10>] 0xffffffff8116ca10
> [<ffffffff813862e8>] 0xffffffff813862e8
> [<ffffffff81114f38>] 0xffffffff81114f38
>
> This patch makes flash_setup be compiled only when CONFIG_MTD
> which solves issue, the MTD driver then fails to register but this is
> less critical.
I think your code blows up if !CONFIG_MTD_COMPLEX_MAPPINGS and
!CONFIG_MTD_MAP_BANK_WIDTH_1 in which case simple_map_init is defined as:
#define simple_map_init(map) BUG_ON(!map_bankwidth_supported((map)->bankwidth))
bankwidth is 1, so:
static inline int map_bankwidth_supported(int w)
{
switch (w) {
#ifdef CONFIG_MTD_MAP_BANK_WIDTH_1
case 1:
#endif
return 1;
[...]
default:
return 0;
}
}
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-01 13:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-30 15:48 [PATCH] flash_setup should only be built when CONFIG_MTD is enabled Florian Fainelli
2009-04-30 15:54 ` David Daney
2009-05-01 13:47 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.