Good.
Where to call it? Auto stage or called by hardwaremain driver?
Need to be effective after soft_reset?
YH
-----Original Message----- From: Jia Jianwei [mailto:JJia@Fortinet.com] Sent: Monday, April 17, 2006 11:23 AM To: Lu, Yinghai; linuxbios@linuxbios.org Subject: Re: [LinuxBIOS] broadcom HT1000 SATA PHY initializing
Sata should be working with the following initializing code. (verified on two boards). Thanks!
Jianwei
void HT1000_SATA_init( void ) { volatile unsigned int *mmio_reg; unsigned int mmio_base,val32; int i;
pcibios_write_config_byte( 1, HT1000_SATA, 0x70, 0x18); pcibios_write_config_byte( 1, HT1000_SATA, 0x78, 0x04);
pcibios_read_config_dword (1, HT1000_SATA, 0x24, &mmio_base);
mmio_base &= 0xfffffffc;
mmio_reg = (unsigned int *)( mmio_base + 0x10f0 );
* mmio_reg = 0x40000001;
mmio_reg = ( unsigned int *)( mmio_base + 0x8c ); * mmio_reg = 0x00ff2007; mdelay( 10 ); * mmio_reg = 0x78592009; mdelay( 10 ); * mmio_reg = 0x00082004; mdelay( 10 ); * mmio_reg = 0x00002004; mdelay( 10 );
for( i = 0; i < 4; i ++ ) { mmio_reg = ( unsigned int *)( mmio_base + 0x40 + i * 256 ); val32 = *mmio_reg ; if( val32 & 0x4 ) { mmio_reg = ( unsigned int *)( mmio_base + 0x48 + i * 256); val32 = *mmio_reg; val32 |= 1; *mmio_reg = val32; mdelay( 10 ); val32 &= ( ~1 ); *mmio_reg = val32; mdelay( 10 ); } }
}
----- Original Message ----- From: "Lu, Yinghai" yinghai.lu@amd.com To: "Jia Jianwei" JJia@Fortinet.com; linuxbios@linuxbios.org Sent: Friday, March 31, 2006 11:40 AM Subject: RE: [LinuxBIOS] broadcom HT1000 SATA PHY initializing
You should be right.
When I was testing that on Broadcom BLAST ref board: STAT and IDE doesn't work.
But on another MB (serverworks HT1000 based), IDE is working.
Maybe some magic bit in pci conf space need to set by option rom...
You could compare the pci conf dump between system bios and
LinuxBIOS...
BTW, Can drop your funny signature in LinuxBIOS?
YH
Because my BIOS source is different with LinuxBIOS, so I think just replace sata_init() in bcm_5785_sata.c should be working. Do not need a soft_reset.In my BIOS source, I just do it after PCI device enumerate and resource allocation.
Regards, Jianwei
----- Original Message ----- From: "Lu, Yinghai" yinghai.lu@amd.com To: "Jia Jianwei" JJia@Fortinet.com; linuxbios@linuxbios.org Sent: Monday, April 17, 2006 11:30 AM Subject: RE: [LinuxBIOS] broadcom HT1000 SATA PHY initializing
Good.
Where to call it? Auto stage or called by hardwaremain driver?
Need to be effective after soft_reset?
YH
-----Original Message----- From: Jia Jianwei [mailto:JJia@Fortinet.com] Sent: Monday, April 17, 2006 11:23 AM To: Lu, Yinghai; linuxbios@linuxbios.org Subject: Re: [LinuxBIOS] broadcom HT1000 SATA PHY initializing
Sata should be working with the following initializing code. (verified on two boards). Thanks!
Jianwei
void HT1000_SATA_init( void ) { volatile unsigned int *mmio_reg; unsigned int mmio_base,val32; int i;
pcibios_write_config_byte( 1, HT1000_SATA, 0x70, 0x18); pcibios_write_config_byte( 1, HT1000_SATA, 0x78, 0x04); pcibios_read_config_dword (1, HT1000_SATA, 0x24, &mmio_base); mmio_base &= 0xfffffffc; mmio_reg = (unsigned int *)( mmio_base + 0x10f0 ); * mmio_reg = 0x40000001; mmio_reg = ( unsigned int *)( mmio_base + 0x8c ); * mmio_reg = 0x00ff2007; mdelay( 10 ); * mmio_reg = 0x78592009; mdelay( 10 ); * mmio_reg = 0x00082004; mdelay( 10 ); * mmio_reg = 0x00002004; mdelay( 10 ); for( i = 0; i < 4; i ++ ) { mmio_reg = ( unsigned int *)( mmio_base + 0x40 + i * 256
); val32 = *mmio_reg ; if( val32 & 0x4 ) { mmio_reg = ( unsigned int *)( mmio_base + 0x48 + i * 256); val32 = *mmio_reg; val32 |= 1; *mmio_reg = val32; mdelay( 10 ); val32 &= ( ~1 ); *mmio_reg = val32; mdelay( 10 ); } }
}
----- Original Message ----- From: "Lu, Yinghai" yinghai.lu@amd.com To: "Jia Jianwei" JJia@Fortinet.com; linuxbios@linuxbios.org Sent: Friday, March 31, 2006 11:40 AM Subject: RE: [LinuxBIOS] broadcom HT1000 SATA PHY initializing
You should be right.
When I was testing that on Broadcom BLAST ref board: STAT and IDE doesn't work.
But on another MB (serverworks HT1000 based), IDE is working.
Maybe some magic bit in pci conf space need to set by option rom...
You could compare the pci conf dump between system bios and
LinuxBIOS...
BTW, Can drop your funny signature in LinuxBIOS?
YH