[Suzaku:00122] uart linux patch後

kyosuke yoshizu email@hidden
2004年 10月 14日 (木) 09:34:44 JST


yoshizuです

yashi殿
 ̄ ̄ ̄ ̄

教えていただいたパッチをあてたところ
SUZKAU boot後ネットワークを動作させようと
すると以下のようになってしまいました


まだなにか足らないところがありますでしょうか?





# netflash http://192.168.10.26/image.bin
netflash: killing tasks...
netflash: failed to find http://192.168.10.26/image.bin
netflash: restarting init process...
NETDEV WATCHDOG: eth0: transmit timed out
eth0: transmit timed out, IRQ conflict?
Scheduling in interrupt
kernel BUG at sched.c:569!




>あ、typoです。MICROBLAZE_UART_BASE_ADDRですね
>
>suzaku特有の address定義は、linux-2.4.x/include/asm-microblaze/suzaku.h

>に書いてあります。
>
>あと、このサンプルだと smscと interruptがぶつかるので、linux-2.4.x/
>driver/net/smc9111.cの smc_irqlistを
>
>static unsigned int smc_irqlist[] = {2, 0}; から
>static unsigned int smc_irqlist[] = {5, 0};
>
>とかに、変更しないと、まずいです。
>
>現在、この辺を簡単に変更できるように、作業しています。現在のコードベー
>スでは、手間ですが手で変更してください。
>--
>           yashi
>



>あります、こんな↓感じです。
>
>uClinux-dist/linux-2.4.x/arch/microblaze/kernel/xmbserial.cに対するパッ

>チです。
>
>現在のドライバーはイマイチなので、置き換える予定です。予定ですので、い
>つになるかは未定ですが…。
>
>わからない部分があったら、聞いてください。
>--
>             yashi
>
>--- xmbserial.c.orig 2004-10-06 10:11:36.000000000 +0900
>+++ xmbserial.c 2004-10-06 10:16:59.000000000 +0900
>@@ -181,9 +181,8 @@
>  */
> static struct xmb_serial xmbrs_table[] = {
>   { 0, (XPAR_CONSOLE_UART_BASEADDR), IRQBASE, ASYNC_BOOT_AUTOCONF },
/* ttyS0 */
>-#ifdef CONFIG_MICROBLAZE_DEBUG_UART
>-  { 0, (XPAR_DEBUG_UART_BASEADDR), IRQBASE+1, ASYNC_BOOT_AUTOCONF } /*
ttyS1 */
>-#endif
>+  { 0, (XPAR_SECOND_UART1_BASEADDR), IRQBASE+2, ASYNC_BOOT_AUTOCONF },
/* ttyS1 */
>+  { 0, (XPAR_SECOND_UART2_BASEADDR), IRQBASE+3, ASYNC_BOOT_AUTOCONF }
/* ttyS2 */
> };
>
> #define NR_PORTS (sizeof(xmbrs_table) / sizeof(struct xmb_serial))
>@@ -389,13 +388,22 @@
>  */
> void xmbrs_interrupt(int irq, void *dev_id, struct pt_regs *regs)
> {
>- struct xmb_serial *info;
>+ struct xmb_serial *info = NULL;
>  unsigned int isr;
>  volatile unsigned int *uartp;
>+ int i;
>
>- info = &xmbrs_table[(irq - IRQBASE)];
>- uartp = (volatile unsigned int *) info->addr;
>+ for(i = 0 ; i < NR_PORTS ; i++){
>+  if(xmbrs_table[i].irq == irq){
>+   info = &xmbrs_table[i];
>+  }
>+ }
>+ if(!info){
>+  printk("invalied irq happen, no : %d\n", irq);
>+  return;
>+ }
>
>+ uartp = (volatile unsigned int *) info->addr;
>  isr = uartp[XUL_STATUS_REG_OFFSET/4];
>
>  /* Grab any valid chars */
>@@ -1464,6 +1472,7 @@
>  switch (info->line) {
>  case 0:
>  case 1:
>+ case 2:
>   break;
>  default:
>   printk("SERIAL: don't know how to handle UART %d interrupt?\n",
>




suzaku メーリングリストの案内