Re: [PATCH 3/3] AT91: initialize IDE driver on AT91SAM9263 cpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wednesday 04 February 2009 13:18:05 Sergei Shtylyov napisał(a):
> Hello.
Hi

> Stanislaw Gruszka wrote:
> > Signed-off-by: Stanislaw Gruszka <stf_xl@xxxxx>
> >   
> [...]
> > diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
> > index b753cb8..503651a 100644
> > --- a/arch/arm/mach-at91/at91sam9263_devices.c
> > +++ b/arch/arm/mach-at91/at91sam9263_devices.c
> > @@ -347,6 +347,103 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
> >  void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
> >  #endif
> >  
> > +/* --------------------------------------------------------------------
> > + *  IDE
> > + * -------------------------------------------------------------------- */
> > +
> > +#if defined(CONFIG_BLK_DEV_IDE_AT91) || defined(CONFIG_BLK_DEV_IDE_AT91_MODULE)
> > +
> > +/* Proper CS address space will be added */
> > +#define AT91_IDE_TASK_FILE	0x00c00000
> > +#define AT91_IDE_CTRL_REG	0x00e00000
> >   
> 
>    Why are you assuming that these offsets are not board specifec I 
> wonder? Theyu clearly depend on how the -CSx were wired on the board -- 
> it's the same board specific data as your IRQ.
Are CPU specific. Actually all AT91(except RM9200) use the same offsets,
so could be moved from here to driver code, like in at91_cf driver. In this file
only we will have proper Chip Select address space resource.

> > +void __init at91_add_device_ide(struct at91_ide_data *data)
> > +{
> >   
> [...]
> > +	/* assign CS4/5 to SMC with Compact Flash logic support
> > +	 * and fix resources addresses */
> >   
> 
>    It again seems like board specific configuration...
No, is not board specific.

> > +	ebi0_csa = at91_sys_read(AT91_MATRIX_EBI0CSA);
> > +	switch (chipselect) {
> > +	case 4:
> > +		at91_set_A_periph(AT91_PIN_PD6, 0);  /* EBI0_NCS4/CFCS0 */
> > +		ebi0_csa |= AT91_MATRIX_EBI0_CS4A_SMC_CF1;
> > +		addr_space = AT91_CHIPSELECT_4;
> > +		break;
> > +	case 5:
> > +		at91_set_A_periph(AT91_PIN_PD7, 0);  /* EBI0_NCS5/CFCS1 */
> > +		ebi0_csa |= AT91_MATRIX_EBI0_CS5A_SMC_CF2;
> > +		addr_space = AT91_CHIPSELECT_5;
> > +		break;
> > +	default:
> > +		printk(KERN_ERR "at91_ide: bad chip select %u\n", chipselect);
> >   
> > +		return;
> >   
> 
>   Why do you consider it bad? Is there some SMC limitation or what?
Yes, Compact Flash ("full" and True IDE mode) is supported only on chip select
4 or 5 for AT91SAM9263 (like for all other SAM9s).


Cheers
Stanislaw Gruszka
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux