From patchwork Fri Apr 12 23:35:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2439341 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9BEBBDF2A1 for ; Fri, 12 Apr 2013 23:36:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753675Ab3DLXgI (ORCPT ); Fri, 12 Apr 2013 19:36:08 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:50301 "EHLO mail-lb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751504Ab3DLXgI (ORCPT ); Fri, 12 Apr 2013 19:36:08 -0400 Received: by mail-lb0-f173.google.com with SMTP id w20so3083565lbh.4 for ; Fri, 12 Apr 2013 16:36:06 -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=BxAGfECP/4Cof5jPgGDHWeOjMwrafwkVhx7UIHd22tKfWQo+0aJq3MQ/oUCc7q9F6m nwPW6Qt0i5x6pVvkUJUuqF3JAUPIF+OzRUL1icqotsEe8s0t4tdgCgQaskgVdwpr7ldJ xBe4JYS7ho3Qx9i+7E00L8ttsGuFCDP17mIxYQXBlpRAm5FfmxKu4bAT/UG/PPtD2AjG TZB5W3mryZ4VO+nlz5NRjrhf+/wVfjiproAZn1zxGxliqMO9o9+yeWUYNgWK626iMCKu chs7JGP4K7QqS8Olvj0QIlCN+1kuzzn5cjW1r2eTgCZkqBQxy0G2yDV+VkCd3er38HtA aN9w== X-Received: by 10.112.168.135 with SMTP id zw7mr6139203lbb.115.1365809766488; Fri, 12 Apr 2013 16:36:06 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-79-80-224.pppoe.mtu-net.ru. [91.79.80.224]) by mx.google.com with ESMTPS id f7sm4022842lbj.13.2013.04.12.16.36.04 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 12 Apr 2013 16:36:05 -0700 (PDT) To: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org Subject: [PATCH v4 7/9] rcar-phy: add platform data Cc: linux-sh@vger.kernel.org, balbi@ti.com From: Sergei Shtylyov Organization: Cogent Embedded Date: Sat, 13 Apr 2013 03:35:10 +0400 MIME-Version: 1.0 Message-Id: <201304130335.10480.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQn/f5sdBSivICSyWIwBan4Y9rCR6UF+UgmmLWy9Mi5UZMAV5/52pugXNc8egs/OWgqI07Fz 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 */