All of lore.kernel.org
 help / color / mirror / Atom feed
* SH ATAPI IDE Driver
@ 2009-10-06  3:42 ivy kim
  2009-10-06  4:07 ` Paul Mundt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ivy kim @ 2009-10-06  3:42 UTC (permalink / raw)
  To: linux-sh

Hi there.

It seems that there is no atapi driver for SH7724.
I'm writing this atapi driver for our company's own SH7724 platform
called 'REVE'.
I've wrote one driver, ide-sh.c based on ide-platform.c and succeeded
in IDE disk chip ID reading.
And ide_host_add() returns success, so I could find some entries on
hda in /proc/ide/hda.
My question/problem is as follows;

1. There is no /dev/hda entry after ide_host_add() success.
        Should I make one by hand using mknod?
2. The ide-gd.c driver is required also? If I add ide-gd,
        I have some more /proc/ide/hda entries such as capacity  geometry etc.

Actually I'm new to linux device driver(linux, to be honest). So I'm
not sure if using ide-platform.c as my code base is correct.
When I use ide-gd.c, this code does not 'probe' the IDE drive...

My feeling on writing this type of driver shall be trivial, but my
code is getting complicated. I think I'm lost.
It seems that there is no document on 'Writing IDE device driver'...also.

My code base is kernel 'sh-2.6-2009-06-08-ms7724se-2.6.30-rc6'

Thanks.
BR..

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: SH ATAPI IDE Driver
  2009-10-06  3:42 SH ATAPI IDE Driver ivy kim
@ 2009-10-06  4:07 ` Paul Mundt
  2009-10-28  8:07 ` ivy kim
  2009-10-28  9:26 ` Paul Mundt
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Mundt @ 2009-10-06  4:07 UTC (permalink / raw)
  To: linux-sh

On Tue, Oct 06, 2009 at 12:42:18PM +0900, ivy kim wrote:
> It seems that there is no atapi driver for SH7724.
> I'm writing this atapi driver for our company's own SH7724 platform
> called 'REVE'.
> I've wrote one driver, ide-sh.c based on ide-platform.c and succeeded
> in IDE disk chip ID reading.

For starters, no new drivers should be written aimed at drivers/ide,
libata is what you should be working with instead, aiming your driver at
drivers/ata (you can see many other pata drivers there for examples on
getting started, including ones that deal with ATAPI).

> It seems that there is no document on 'Writing IDE device driver'...also.

All of the libata documentation is in-kernel, and you can generate pdfs
with 'make pdfdocs', or you can just read through the DocBook file in
Documentation/DocBook/libata.tmpl.

If you run in to further issues, you may also wish to subscribe to or Cc
the linux-ide@vger.kernel.org mailing list, where all IDE and libata
related discussion takes place:

	http://vger.kernel.org/vger-lists.html#linux-ide

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: SH ATAPI IDE Driver
  2009-10-06  3:42 SH ATAPI IDE Driver ivy kim
  2009-10-06  4:07 ` Paul Mundt
@ 2009-10-28  8:07 ` ivy kim
  2009-10-28  9:26 ` Paul Mundt
  2 siblings, 0 replies; 4+ messages in thread
From: ivy kim @ 2009-10-28  8:07 UTC (permalink / raw)
  To: linux-sh

Dear,

> For starters, no new drivers should be written aimed at drivers/ide,
> libata is what you should be working with instead, aiming your driver at
> drivers/ata (you can see many other pata drivers there for examples on
> getting started, including ones that deal with ATAPI).
>
Although it's late, thank you for the answer. I managed to make IDE working.
But this is just PIO mode, and now I'm checking DMA mode but I read
the following article before, so I want to check if I should use
latest source code if the below mentioned DMA engine work is done.
For now, I'm using 'sh-2.6-2009-06-08-ms7724se-2.6.30-rc6'

Later on, I'll post at linux-ide mailing list...

Thanks.
BR.

-----------------
Hi,

Paul Mundt wrote:

>On Wed, Jul 15, 2009 at 10:02:14AM +0900, MASAO TAKAHASHI wrote:
>>Do you have a plan to support a ATAPI driver on the SH7724 ?
>
>It is planned for the long term, but I am not sure when we will get to
>it. Presently there is quite a lot of other SH7724 related work to do
>that will take priority. The ATAPI interface also really wants
>Iwamatsu-san's DMA engine work to be merged first.

>Is there a list a TODO list for each sh architecture?

Michael
-------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: SH ATAPI IDE Driver
  2009-10-06  3:42 SH ATAPI IDE Driver ivy kim
  2009-10-06  4:07 ` Paul Mundt
  2009-10-28  8:07 ` ivy kim
@ 2009-10-28  9:26 ` Paul Mundt
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Mundt @ 2009-10-28  9:26 UTC (permalink / raw)
  To: linux-sh

On Wed, Oct 28, 2009 at 05:07:23PM +0900, ivy kim wrote:
> > For starters, no new drivers should be written aimed at drivers/ide,
> > libata is what you should be working with instead, aiming your driver at
> > drivers/ata (you can see many other pata drivers there for examples on
> > getting started, including ones that deal with ATAPI).
> >
> Although it's late, thank you for the answer. I managed to make IDE working.
> But this is just PIO mode, and now I'm checking DMA mode but I read
> the following article before, so I want to check if I should use
> latest source code if the below mentioned DMA engine work is done.
> For now, I'm using 'sh-2.6-2009-06-08-ms7724se-2.6.30-rc6'
> 
> Later on, I'll post at linux-ide mailing list...
> 
Yes, the dmaengine bits are merged upstream, although presently it's only
enabled for sh7722 and sh7780. Getting it working for SH7724 should be
pretty trivial, since it shouldn't really need much modification over the
SH7722 support (which you can see in arch/sh/kernel/cpu/sh4a/setup-sh7722.c).

If you fetch any recent kernel (ie, 2.6.31 or later) support is
available, and should give you a stable platform for doing your driver
development on.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-28  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-06  3:42 SH ATAPI IDE Driver ivy kim
2009-10-06  4:07 ` Paul Mundt
2009-10-28  8:07 ` ivy kim
2009-10-28  9:26 ` Paul Mundt

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.