From patchwork Fri Apr 19 22:01:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2467151 Return-Path: X-Original-To: patchwork-linux-sh@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 28E173FD8C for ; Fri, 19 Apr 2013 22:02:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964938Ab3DSWCt (ORCPT ); Fri, 19 Apr 2013 18:02:49 -0400 Received: from mail-lb0-f176.google.com ([209.85.217.176]:39922 "EHLO mail-lb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964935Ab3DSWCt (ORCPT ); Fri, 19 Apr 2013 18:02:49 -0400 Received: by mail-lb0-f176.google.com with SMTP id y8so4094881lbh.7 for ; Fri, 19 Apr 2013 15:02:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:to:subject:cc:from:organization:date:mime-version :content-type:content-transfer-encoding:message-id :x-gm-message-state; bh=L4BakFSzSKppn1Ctzw5afuCntGzsPnTPm+MPsrXblnw=; b=mXE1YYLiiK9M0YeJHtp/eM9gExuWL9TmEPCUyx5NnPw0GAw1MAYuN3OsEr87Y1t4EV Ju0ga4HP9/Z5592QX4TyGSffuv6IX4g7ZnJyRl3VJCxAeQi497sppNVC4a/oifKLlvbA nXpgL9Ch0cxq6zyIoQPoL1sl+yQTj89pIfqdaEHJ3LR2YpNbKfbX84gsUOZDDWQDtCCf bcaHh1w1bInhGT4lmnfRKbUjrUfTJyVJlYGIVfPyo189YRRpDPcAkvun2bKSJJHvB53i RXh0+sR1Wm69f/qaCmc8lnTTWtz/8Dgpazb2x47rD9Jtz3MFWYO3rXVCcj0p23nyHLYS ADFw== X-Received: by 10.112.74.193 with SMTP id w1mr8788977lbv.125.1366408967736; Fri, 19 Apr 2013 15:02:47 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-79-86-130.pppoe.mtu-net.ru. [91.79.86.130]) by mx.google.com with ESMTPS id l20sm6513816lbv.9.2013.04.19.15.02.45 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 19 Apr 2013 15:02:46 -0700 (PDT) To: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org Subject: [PATCH v5 7/9] rcar-phy: add platform data Cc: linux-sh@vger.kernel.org, balbi@ti.com From: Sergei Shtylyov Organization: Cogent Embedded Date: Sat, 20 Apr 2013 02:01:57 +0400 MIME-Version: 1.0 Message-Id: <201304200201.58386.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQlEuEWR69FF5B5RlsjKkS2bymkN8Q2dgNiZoVC5HK1oC4EfKVxB0XKMSugt09PFWaXR60hI Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Currently the driver hard-codes USBPCTRL0 register to 0. It is wrong since this register contains board-specific USB ports configuration and so its value should be somehow passed via the platform data. Add file with the 'struct rcar_phy_platform_data' containing various bit fields describing USB pin configuration. Signed-off-by: Sergei Shtylyov Acked-by: Kuninori Morimoto Acked-by: Simon Horman --- Changes since version 3: - moved USBPCTRL0 register bit #define's to patch #9; - replaced USBPCTRL0 register value in the platform data structure by a set of bit fields describing the configuration of the board, rewrote changelog; Changes since version 2: - added #include ; - added ACKs from Simon Horman and Kuninori Morimoto. include/linux/usb/rcar-phy.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: renesas/include/linux/usb/rcar-phy.h =================================================================== --- /dev/null +++ renesas/include/linux/usb/rcar-phy.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013 Cogent Embedded, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __RCAR_PHY_H +#define __RCAR_PHY_H + +#include + +struct rcar_phy_platform_data { + bool port1_func:1; /* true: port 1 used by function, false: host */ + unsigned penc1:1; /* Output of the PENC1 pin in function mode */ + struct { /* Overcurrent pin control for ports 0..2 */ + bool select_3_3v:1; /* true: USB_OVCn pin, false: OVCn pin */ + /* Set to false on port 1 in function mode */ + bool active_high:1; /* true: active high, false: active low */ + /* Set to true on port 1 in function mode */ + } ovc_pin[3]; +}; + +#endif /* __RCAR_PHY_H */