logo       

Re: [PATCH 1/4]: Check EEPROM before tweaking SERDES: msg#01586

linux-wireless

Subject: Re: [PATCH 1/4]: Check EEPROM before tweaking SERDES

On Fri, Jul 31, 2009 at 11:02 AM, Nick
Kossifidis<mick@xxxxxxxxxxxxxxxxxxx> wrote:
> Â* Read PCI-E infos offset from EEPROM and if it points to
> Â serdes section (0x40), enable serdes programming (further
> Â tweaking of serdes values during attach). This follows
> Â Legacy and Sam's HAL sources.
>
> ---
> Âdrivers/net/wireless/ath/ath5k/attach.c | Â 56
> +++++++++++++++++++------------
> Âdrivers/net/wireless/ath/ath5k/eeprom.c | Â 10 +++++
> Âdrivers/net/wireless/ath/ath5k/eeprom.h | Â Â4 ++
> Â3 files changed, 48 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/attach.c
> b/drivers/net/wireless/ath/ath5k/attach.c
> index 9a84d94..6263065 100644
> --- a/drivers/net/wireless/ath/ath5k/attach.c
> +++ b/drivers/net/wireless/ath/ath5k/attach.c
> @@ -253,28 +253,6 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc,
> u8 mac_version)
> Â Â Â Â}
>
> Â Â Â Â/*
> - Â Â Â Â* Write PCI-E power save settings
> - Â Â Â Â*/
> - Â Â Â if ((ah->ah_version == AR5K_AR5212) && (pdev->is_pcie)) {
> - Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0x9248fc00, AR5K_PCIE_SERDES);
> - Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0x24924924, AR5K_PCIE_SERDES);
> - Â Â Â Â Â Â Â /* Shut off RX when elecidle is asserted */
> - Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0x28000039, AR5K_PCIE_SERDES);
> - Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0x53160824, AR5K_PCIE_SERDES);
> - Â Â Â Â Â Â Â /* TODO: EEPROM work */
> - Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0xe5980579, AR5K_PCIE_SERDES);
> - Â Â Â Â Â Â Â /* Shut off PLL and CLKREQ active in L1 */
> - Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0x001defff, AR5K_PCIE_SERDES);
> - Â Â Â Â Â Â Â /* Preserce other settings */
> - Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0x1aaabe40, AR5K_PCIE_SERDES);
> - Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0xbe105554, AR5K_PCIE_SERDES);
> - Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0x000e3007, AR5K_PCIE_SERDES);
> - Â Â Â Â Â Â Â /* Reset SERDES to load new settings */
> - Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0x00000000, AR5K_PCIE_SERDES_RESET);
> - Â Â Â Â Â Â Â mdelay(1);
> - Â Â Â }
> -
> - Â Â Â /*
> Â Â Â Â * POST
> Â Â Â Â */
> Â Â Â Âret = ath5k_hw_post(ah);


Can the changes for the code be done before the move, or after so that
way the actual code changes to the section can be easily readable?

> @@ -295,6 +273,40 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc,
> u8 mac_version)
> Â Â Â Â Â Â Â Âgoto err_free;
> Â Â Â Â}
>
> + Â Â Â /*
> + Â Â Â Â* Write PCI-E power save settings
> + Â Â Â Â*/
> + Â Â Â if ((ah->ah_version == AR5K_AR5212) && (pdev->is_pcie)) {
> + Â Â Â Â Â Â Â struct ath5k_eeprom_info *ee =
> &ah->ah_capabilities.cap_eeprom;
> +
> + Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0x9248fc00, AR5K_PCIE_SERDES);
> + Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0x24924924, AR5K_PCIE_SERDES);
> +
> + Â Â Â Â Â Â Â /* Shut off RX when elecidle is asserted */
> + Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0x28000039, AR5K_PCIE_SERDES);
> + Â Â Â Â Â Â Â ath5k_hw_reg_write(ah, 0x53160824, AR5K_PCIE_SERDES);
> +
> + Â Â Â Â Â Â Â /* If serdes programing is enabled, increase PCI-E
> + Â Â Â Â Â Â Â Â* tx power for systems with long trace from host
> + Â Â Â Â Â Â Â Â* to minicard connector. */

This is just comment-picky mind using this style for comments for > 1 lines?

/*
* foo bleh buh
* bar
* qwerty
*/

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

Google Custom Search

News | Mail Home | sitemap | FAQ | advertise