From patchwork Thu Apr 4 23:07:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2395411 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 A61613FD1A for ; Thu, 4 Apr 2013 23:09:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764839Ab3DDXJH (ORCPT ); Thu, 4 Apr 2013 19:09:07 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:62135 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764799Ab3DDXJG (ORCPT ); Thu, 4 Apr 2013 19:09:06 -0400 Received: by mail-la0-f52.google.com with SMTP id fs12so2921775lab.25 for ; Thu, 04 Apr 2013 16:09:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:to:subject:from:organization:cc:date:mime-version :content-type:content-transfer-encoding:message-id :x-gm-message-state; bh=yCa+V8LTH5/7jwc+0qfANpXqH21cTpXQuaNdkWRBpo0=; b=ZBhz1TMZDzHfoUmBpzdEaJ6k5AQUK04pC1lV4zuhPf7H5aTjw/z/fTcrdwZtvNPeQs kw0MzzUN0v6uj4RJcMFwoUQE9RyT2C/YLFvTi5DLSonQwakNCOxOh9X7/0UeWoZGxTG+ FFRcCF5p9BIVw54euzw5dTwLSRE+eg+8Ap4++zgzyS4XOjSpbQOg0STNWTzbsh5ZkDV2 5oplrtrW1sdKoZoLligHaJxRQFooq5MNRKgd3hwsTzFx/4UMpvlulOMlpfUFUXhx599X pslWt+81TULUQAaDBGkCGtb4O1n8Xln1qMPF8n7IZMpD0L/9KLwIDGOIihIlWAYlHXRu 6EZw== X-Received: by 10.112.147.42 with SMTP id th10mr4638081lbb.64.1365116944192; Thu, 04 Apr 2013 16:09:04 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-79-100-82.pppoe.mtu-net.ru. [91.79.100.82]) by mx.google.com with ESMTPS id sl5sm4605716lbb.10.2013.04.04.16.09.01 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 16:09:03 -0700 (PDT) To: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org Subject: [PATCH 6/8] rcar-phy: add platform data From: Sergei Shtylyov Organization: Cogent Embedded Cc: linux-sh@vger.kernel.org, balbi@ti.com Date: Fri, 5 Apr 2013 03:07:50 +0400 MIME-Version: 1.0 Message-Id: <201304050307.51360.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQl8OqXzDPJEXLx/CNmeiRp0bFreXttvTcxMsQNBcUglKMMpyRkysrzV4YtRF9pMYR5WZ0Ar 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 USBPCTRL0 bit #define's and 'struct rcar_phy_platform_data' containing the value to be set by the driver to that register. Signed-off-by: Sergei Shtylyov --- include/linux/usb/rcar-phy.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 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,39 @@ +/* + * 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 + +/* USBPCTRL0 register bits */ +#define USBPCTRL0_OVC2 BIT(10) /* Switches the OVC input pin for port 2: */ + /* 1: USB_OVC2, 0: OVC2 */ +#define USBPCTRL0_OVC1_VBUS1 BIT(9) /* Switches the OVC input pin for port 1: */ + /* 1: USB_OVC1, 0: OVC1/VBUS1 */ +#define USBPCTRL0_OVC0 BIT(8) /* Switches the OVC input pin for port 0: */ + /* 1: USB_OVC0 pin, 0: OVC0 */ +#define USBPCTRL0_OVC2_ACT BIT(6) /* Host mode: OVC2 polarity: */ + /* 1: active-high, 0: active-low */ + /* Function mode: be sure to set to 1 */ +#define USBPCTRL0_PENC BIT(4) /* Function mode: output level of PENC1 pin: */ + /* 1: high, 0: low */ +#define USBPCTRL0_OVC0_ACT BIT(3) /* Host mode: OVC0 polarity: */ + /* 1: active-high, 0: active-low */ +#define USBPCTRL0_OVC1_ACT BIT(1) /* Host mode: OVC1 polarity: */ + /* 1: active-high, 0: active-low */ + /* Function mode: be sure to set to 1 */ +#define USBPCTRL0_PORT1 BIT(0) /* Selects port 1 mode: */ + /* 1: function, 0: host */ + +struct rcar_phy_platform_data { + u32 usbpctrl0; /* USBPCTRL0 register value */ +}; + +#endif /* __RCAR_PHY_H */