[RFC PATCH 17/19] powerpc: wii: bootmii starlet 'mini' firmware support

Albert Herranz albert_herranz at yahoo.es
Tue Nov 24 06:21:07 EST 2009


Arnd Bergmann wrote:
> On Sunday 22 November 2009, Albert Herranz wrote:
>> + *
>> + */
>> +struct mipc_device {
>> +	void __iomem *io_base;
>> +	int irq;
>> +
>> +	struct device *dev;
>> +
>> +	spinlock_t call_lock;	/* serialize firmware calls */
>> +	spinlock_t io_lock;	/* serialize access to io registers */
>> +
>> +	struct mipc_infohdr *hdr;
>> +
>> +	struct mipc_req *in_ring;
>> +	size_t in_ring_size;
>> +	volatile u16 intail_idx;
>> +
>> +	struct mipc_req *out_ring;
>> +	size_t out_ring_size;
>> +	volatile u16 outhead_idx;
>> +
>> +	u32 tag;
>> +};
> 
> The 'volatile' here seems out of place. What are you trying to protect
> against?

Nothing. I'll get rid of it.
It slipped through from ancient versions of the patch.

> The rest of the patch seems to be made up of layers of wrappers. They
> are all well coded, but I got a feeling that the same could be achieved
> with less of it.

The code provides a complete emulation layer of hardware accessors via ipc calls to the firmware.
This was a requirement to access part of the hardware until a "magic" register was found allowing direct hardware access from the PowerPC side.

I can get rid of the currently unused infrastructure and leave the strictly needed code (i.e. code to make sure that the firmware SDHC driver is shutdown and that the ahbprot register is properly setup).

I'll look into that. Thanks.

Cheers,
Albert



More information about the Linuxppc-dev mailing list