Skip to contentSkip to conversation

Kernel 2.6.10 running on mpc8272ads

PATCH New [email protected] 3 participants 5 messages Dec 9, 2004 – Jan 12, 2005

lore
Share & tools
lore
#0 lore raw

Hi to all,

Finally I got my mpc8272ads board running the 2.6.20-rc1 kernel. The trick was:

First, I had to comment out the BCSR modification for second UART in m82xx_board_init function (arch/ppc/platforms/pq2ads.c). As suggested by Dan Malek, MMU is still off at this point.

Second, the uboot bootargs must be modified from those used for kernel 2.4. Now, the selected console has to be ttyCPM. This was unnecesary in kernel 2.4, as correct console was selected by default.

Best regards

#1 lore raw
Quoted 8 lines · On Thu, Dec 09, 2004 at 10:42:57AM +0100, [email protected] wrote:

Hi to all,

Finally I got my mpc8272ads board running the 2.6.20-rc1 kernel. The trick was:

First, I had to comment out the BCSR modification for second UART in m82xx_board_init function (arch/ppc/platforms/pq2ads.c). As suggested by Dan Malek, MMU is still off at this point.

Indeed. While I had a PQ2FADS for a bit, I had to do that as well. Kumar, what/why is that needed exactly? Did I screw up in re-working the 82xx init stuff and it needs to happen a bit later in boot?

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#2 lore raw
Quoted 3 lines · Tom Rini

Indeed. While I had a PQ2FADS for a bit, I had to do that as well. Kumar, what/why is that needed exactly? Did I screw up in re-working the 82xx init stuff and it needs to happen a bit later in boot?

I don't understand the what/why question, but that has never stopped me from providing answers in the past :-)

So, In 2.6, and I think in some of the 2.4 cpm2 stuff, we no longer automatically map any of the hardware IO resources for common access like I used to do in the past. If you want to access the BCSR, you need to make sure it is ioremap()'ed in your driver before you make the access. Was that the question, or was it that the BCSR should have been set someplace outside of the driver for the serial port to work?

	-- Dan
#3 lore raw
Quoted 9 lines · Dan Malek
Quoted 3 lines · Tom Rini

Indeed. While I had a PQ2FADS for a bit, I had to do that as well. Kumar, what/why is that needed exactly? Did I screw up in re-working the 82xx init stuff and it needs to happen a bit later in boot?

I don't understand the what/why question, but that has never stopped me from providing answers in the past :-)

Ha!

Quoted 7 lines

So, In 2.6, and I think in some of the 2.4 cpm2 stuff, we no longer automatically map any of the hardware IO resources for common access like I used to do in the past. If you want to access the BCSR, you need to make sure it is ioremap()'ed in your driver before you make the access. Was that the question, or was it that the BCSR should have been set someplace outside of the driver for the serial port to work?

Actually, I did break it. When I re-worked the hooks around platform_init/ppc_md.setup_arch, I added a call-out from platform_init() but not from m82xx_setup_arch(), when I really needed one. I'll follow up with a patch momentarily.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#4 lore raw

PATCH 1/1 ppc32: Fix mpc8272ads

When I reworked the m82xx init functions, I inadvertantly broke the callout we had from ppc_md.setup_arch() that boards can use to poke & prod things, once mappings are set. The following adds in a callback and updates the one m82xx board that needs it.

arch/ppc/syslib/m8260_setup.c +8 -1
@@ -37,6 +37,12 @@
 extern void m8260_find_bridges(void);
 extern void idma_pci9_init(void);
 
+/* Place-holder for board-specific init */
+void __attribute__ ((weak)) __init
+m82xx_board_setup(void)
+{
+}
+
 static void __init
 m8260_setup_arch(void)
 {
@@ -56,6 +62,7 @@
 	if (initrd_start)
 		ROOT_DEV = Root_RAM0;
 #endif
+	m82xx_board_setup();
 }
 
 /* The decrementer counts at the system (internal) clock frequency
@@ -203,7 +210,7 @@
 	io_block_mapping(IO_VIRT_ADDR, IO_PHYS_ADDR, 0x10000000, _PAGE_IO);
 }
 
-/* Place-holder for board-specific init */
+/* Place-holder for board-specific ppc_md hooking */
 void __attribute__ ((weak)) __init
 m82xx_board_init(void)
 {
arch/ppc/platforms/pq2ads.c +2 -2
@@ -19,8 +19,8 @@
 #include <asm/mpc8260.h>
 
 void __init
-m82xx_board_init(void)
+m82xx_board_setup(void)
 {
 	/* Enable the 2nd UART port */
-        *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_RS232_EN2;
+	*(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_RS232_EN2;
 }
Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/