All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshinori Sato <ysato@users.sourceforge.jp>
To: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: linux-ide@vger.kernel.org
Subject: Re: H8/300 target support patch
Date: Tue, 17 Feb 2004 01:09:49 +0900	[thread overview]
Message-ID: <m265e7dn02.wl%ysato@users.sourceforge.jp> (raw)
In-Reply-To: <200402151540.56377.bzolnier@elka.pw.edu.pl>

At Sun, 15 Feb 2004 15:40:56 +0100,
Bartlomiej Zolnierkiewicz wrote:
> 
> On Sunday 15 of February 2004 07:05, Yoshinori Sato wrote:
> > Hello.
> > I develop H8/300 support of linux kernel.
> >
> > I made a patch to use IDE driver with a H8/300 target.
> > I want to do merge to source if possible.
> >
> > How will about it?
> 
> Hi,
> 
> + *  reference schematic is http://www.linet.gr.jp/mituiwa/h8/h8osv3/hddprog/hdd.png
> 
> this link is dead
>
> +#include <linux/mm.h>
> +#include <linux/interrupt.h>
> +#include <linux/blkdev.h>
> 
> why do you include mm.h and blkdev.h?

It is code in a thing of 2.4.x
I seem to have left that deleted it when shifted to new driver.
 
> +static void _outsw(unsigned long addr, void *buf, u32 len)
> +{
> +	unsigned volatile short *ap = (unsigned volatile short *)addr;
> +	unsigned short *bp = (unsigned short *)buf;
> +	unsigned short d;
> +	while(len--) {
> +		d = *bp++;
> +		*ap = (d << 8) | (d >> 8);
> +	}
> +}
> +
> +static void _insw(unsigned long addr, void *buf, u32 len)
> +{
> +	unsigned volatile short *ap = (unsigned volatile short *)addr;
> +	unsigned short *bp = (unsigned short *)buf;
> +	unsigned short d;
> +	while(len--) {
> +		d = *ap;
> +		*bp++ = (d << 8) | (d >> 8);
> +	}
> +}
> 
> why you don't use outsw() and insw() from include/asm-h8300/io.h?

Because bus turns over, insw/outsw is not usable.

> +	ide_setup_ports(&hw, IDE_BASE, (int *)offsets,
> +                             IDE_CTRL, 0, NULL,IDE_IRQ);
> 
> ide_setup_ports() is deprecated, please do not use it.
> 
> +		hwif->mmio  = 0;
> 
> Your driver is doing MMIO, it should request and release resources itself
> and set hwif->mmio to 2.
> 
> +void __init h8300_ide_print_resource(char *name, hw_regs_t *hw)
> +{
> +	printk("%s at 0x%08x-0x%08x,0x%08x on irq %d", name,
> +		(unsigned int)hw->io_ports[IDE_DATA_OFFSET],
> +		(unsigned int)hw->io_ports[IDE_DATA_OFFSET]+15,
> +		(unsigned int)hw->io_ports[IDE_CONTROL_OFFSET],
> +		hw->irq);
> +}
> 
> Is this necessary (this is a reason for extra #ifdefs in ide-probe.c)?
> Can't we do what m68k is doing (print only address and IRQ) for now?

I can use it.
But there is the problem that resource to use cannot output justly.
I think that solved if can define a part of +7 with #define.
 
> Both drivers use same IO ops so they can be moved to some include file
> or both drivers can be merged (preferred solution) - they are for different
> boards and can't work together (plus MAX_HWIFS is defined to 1 for h8300).
>
> Here is patch (not tested) addressing some of these issues...

I identified operation.
MMIO and print_resource examine a correction method.

Thank you.

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

  reply	other threads:[~2004-02-16 16:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-15  6:05 H8/300 target support patch Yoshinori Sato
2004-02-15 14:40 ` Bartlomiej Zolnierkiewicz
2004-02-16 16:09   ` Yoshinori Sato [this message]
2004-02-16 16:40     ` Bartlomiej Zolnierkiewicz
2004-02-16 22:07       ` Benjamin Herrenschmidt
2004-02-16 22:09     ` Benjamin Herrenschmidt
2004-02-17 11:33       ` Yoshinori Sato
2004-02-17 12:55         ` Benjamin Herrenschmidt
2004-02-19 16:12           ` Yoshinori Sato
2004-02-19 16:34             ` Bartlomiej Zolnierkiewicz
2004-02-20 12:28               ` Yoshinori Sato
2004-02-20 15:25                 ` Bartlomiej Zolnierkiewicz
2004-02-20 17:58                   ` Yoshinori Sato
2004-02-20 18:42                     ` Bartlomiej Zolnierkiewicz
2004-02-22 16:30                       ` Yoshinori Sato
2004-02-22 17:08                         ` Bartlomiej Zolnierkiewicz
2004-02-22 17:28                           ` Bartlomiej Zolnierkiewicz
2004-02-26 16:46                             ` Yoshinori Sato
2004-02-26 19:26                               ` Bartlomiej Zolnierkiewicz
2004-02-28 17:02                                 ` Yoshinori Sato
2004-02-28 17:55                                   ` Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m265e7dn02.wl%ysato@users.sourceforge.jp \
    --to=ysato@users.sourceforge.jp \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.