Re: [PATCH] firmware: convert acenic driver to request_firmware()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Woodhouse
Date: Monday, June 16, 2008 - 10:23 am

On Mon, 2008-06-16 at 12:25 -0400, Jes Sorensen wrote:

We don't have hardware, so haven't been able to test it on either
little-endian or big-endian machines, but we took care to ensure that it
should work on both.


Currently, we have the firmware in the host's native endianness -- it's
in the driver in an array of uint32_t. And we just call writel() with
each word of it in turn.

If we provide the firmware via request_firmware(), we don't want to have
separate versions of the firmware files for big-endian and little-endian
hosts. It makes much more sense just to have _one_ version of each
binary file, and either call writel(le32_to_cpu()) for each word, or
writel(be32_to_cpu()).

We chose the former, because it can be simplified to __raw_writel().

Since the CPU on the device is big-endian, I would be amenable to an
argument that we should store the firmware in its native big-endian
form, and load it with writel(be32_to_cpu()) instead.

It doesn't matter much either way, really. 

-- 
dwmw2

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] firmware: convert acenic driver to request_fir ..., David Woodhouse, (Mon Jun 16, 10:23 am)