From patchwork Tue Apr 9 15:05:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 2415741 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0A4283FC71 for ; Tue, 9 Apr 2013 15:04:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934960Ab3DIPEy (ORCPT ); Tue, 9 Apr 2013 11:04:54 -0400 Received: from mx3.wp.pl ([212.77.101.7]:5641 "EHLO mx3.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932898Ab3DIPEw (ORCPT ); Tue, 9 Apr 2013 11:04:52 -0400 Received: (wp-smtpd smtp.wp.pl 14601 invoked from network); 9 Apr 2013 17:04:50 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1365519891; bh=Mf+Ek+Ir0ybj5s8XTaAmg4UHyhZTIL/Ua/L8mhlh9lk=; h=From:To:Cc:Subject; b=RRgml3z1szNqQNvvbcVxDRKdOs0RokbBHL73pKUzNSMg4rZ8ez8/Lm/QvGGkyS2Zd BggdFIf+fCvyAMe03gFDEElS7/FgfLqjM3pOjQmZu2ncS/C4nkx+7wpofVRmPEBp9t KrDWJ9EK76/FhUEBh0eTpmtNW814Pb7Ij/j+4NqA= Received: from ip-94-112-188-158.net.upcbroadband.cz (HELO localhost) (stf_xl@wp.pl@[94.112.188.158]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with AES128-SHA encrypted SMTP for ; 9 Apr 2013 17:04:50 +0200 From: stf_xl@wp.pl To: "John W. Linville\"" Cc: linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com, Stanislaw Gruszka Subject: [PATCH 06/11] rt2800: move RFCSR6_R2 & LDO_CFG0 setup to 3572 specific rfcsr init Date: Tue, 9 Apr 2013 17:05:25 +0200 Message-Id: <1365519930-3230-7-git-send-email-stf_xl@wp.pl> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1365519930-3230-1-git-send-email-stf_xl@wp.pl> References: <1365519930-3230-1-git-send-email-stf_xl@wp.pl> X-WP-DKIM-Status: good (id: wp.pl) X-WP-AV: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-SPAM: NO 0000000 [oYOE] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/rt2x00/rt2800lib.c | 34 +++++++++++++++--------------- 1 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 83554da..7130040 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c @@ -4710,6 +4710,9 @@ static void rt2800_init_rfcsr_3390(struct rt2x00_dev *rt2x00dev) static void rt2800_init_rfcsr_3572(struct rt2x00_dev *rt2x00dev) { + u8 rfcsr; + u32 reg; + rt2800_rfcsr_write(rt2x00dev, 0, 0x70); rt2800_rfcsr_write(rt2x00dev, 1, 0x81); rt2800_rfcsr_write(rt2x00dev, 2, 0xf1); @@ -4741,6 +4744,20 @@ static void rt2800_init_rfcsr_3572(struct rt2x00_dev *rt2x00dev) rt2800_rfcsr_write(rt2x00dev, 29, 0x9b); rt2800_rfcsr_write(rt2x00dev, 30, 0x09); rt2800_rfcsr_write(rt2x00dev, 31, 0x10); + + rt2800_rfcsr_read(rt2x00dev, 6, &rfcsr); + rt2x00_set_field8(&rfcsr, RFCSR6_R2, 1); + rt2800_rfcsr_write(rt2x00dev, 6, rfcsr); + + rt2800_register_read(rt2x00dev, LDO_CFG0, ®); + rt2x00_set_field32(®, LDO_CFG0_LDO_CORE_VLEVEL, 3); + rt2x00_set_field32(®, LDO_CFG0_BGSEL, 1); + rt2800_register_write(rt2x00dev, LDO_CFG0, reg); + msleep(1); + rt2800_register_read(rt2x00dev, LDO_CFG0, ®); + rt2x00_set_field32(®, LDO_CFG0_LDO_CORE_VLEVEL, 0); + rt2x00_set_field32(®, LDO_CFG0_BGSEL, 1); + rt2800_register_write(rt2x00dev, LDO_CFG0, reg); } static void rt2800_init_rfcsr_5390(struct rt2x00_dev *rt2x00dev) @@ -4990,23 +5007,6 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev) return 0; } - - if (rt2x00_rt(rt2x00dev, RT3572)) { - rt2800_rfcsr_read(rt2x00dev, 6, &rfcsr); - rt2x00_set_field8(&rfcsr, RFCSR6_R2, 1); - rt2800_rfcsr_write(rt2x00dev, 6, rfcsr); - - rt2800_register_read(rt2x00dev, LDO_CFG0, ®); - rt2x00_set_field32(®, LDO_CFG0_LDO_CORE_VLEVEL, 3); - rt2x00_set_field32(®, LDO_CFG0_BGSEL, 1); - rt2800_register_write(rt2x00dev, LDO_CFG0, reg); - msleep(1); - rt2800_register_read(rt2x00dev, LDO_CFG0, ®); - rt2x00_set_field32(®, LDO_CFG0_LDO_CORE_VLEVEL, 0); - rt2x00_set_field32(®, LDO_CFG0_BGSEL, 1); - rt2800_register_write(rt2x00dev, LDO_CFG0, reg); - } - /* * Set RX Filter calibration for 20MHz and 40MHz */