From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 4/4] board: pic32mzda: enable USB-host, USB-storage support.
Date: Wed, 16 Mar 2016 16:49:48 +0100 [thread overview]
Message-ID: <56E9809C.7030100@denx.de> (raw)
In-Reply-To: <56E92374.1080106@gmail.com>
On 03/16/2016 10:12 AM, Daniel Schwierzeck wrote:
>
>
> Am 15.03.2016 um 13:44 schrieb Purna Chandra Mandal:
>> Enable MUSB host and USB storage support for Microchip
>> PIC32MZ[DA] Starter Kit.
>>
>> Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
>>
>> ---
>>
>> Changes in v3:
>> - add arch specific reads{bwlq}, writes{bwlq} in respective arch io.h
>> - remove reads{bwlq}, writes{bwlq} in musb-new driver
>>
>> Changes in v2:
>> - compilation fix in drivers/usb/musb-new/linux-compat.h seperated
>> - compilation fix in drivers/gadget/f_mass_storage.c seperated
>>
>> arch/mips/dts/pic32mzda.dtsi | 10 ++++++++++
>> arch/mips/dts/pic32mzda_sk.dts | 4 ++++
>> configs/pic32mzdask_defconfig | 6 +++++-
>> include/configs/pic32mzdask.h | 7 +++++++
>> 4 files changed, 26 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/mips/dts/pic32mzda.dtsi b/arch/mips/dts/pic32mzda.dtsi
>> index 7d180d9..57e4500 100644
>> --- a/arch/mips/dts/pic32mzda.dtsi
>> +++ b/arch/mips/dts/pic32mzda.dtsi
>> @@ -171,4 +171,14 @@
>> #address-cells = <1>;
>> #size-cells = <0>;
>> };
>> +
>> + usb: musb at 1f8e3000 {
>> + compatible = "microchip,pic32mzda-usb";
>> + reg = <0x1f8e3000 0x1000>,
>> + <0x1f884000 0x1000>;
>> + reg-names = "mc", "control";
>> + interrupts = <132 IRQ_TYPE_EDGE_RISING>,
>> + <133 IRQ_TYPE_LEVEL_HIGH>;
>> + status = "disabled";
>> + };
>> };
>> diff --git a/arch/mips/dts/pic32mzda_sk.dts b/arch/mips/dts/pic32mzda_sk.dts
>> index e5ce0bd..0a7847e 100644
>> --- a/arch/mips/dts/pic32mzda_sk.dts
>> +++ b/arch/mips/dts/pic32mzda_sk.dts
>> @@ -52,4 +52,8 @@
>> ethernet_phy: lan8740_phy at 0 {
>> reg = <0>;
>> };
>> +};
>> +
>> +&usb {
>> + status = "okay";
>> };
>> \ No newline at end of file
>> diff --git a/configs/pic32mzdask_defconfig b/configs/pic32mzdask_defconfig
>> index 1dbe1b5..544112f 100644
>> --- a/configs/pic32mzdask_defconfig
>> +++ b/configs/pic32mzdask_defconfig
>> @@ -12,6 +12,7 @@ CONFIG_SYS_PROMPT="dask # "
>> CONFIG_LOOPW=y
>> CONFIG_CMD_MEMTEST=y
>> CONFIG_CMD_MEMINFO=y
>> +CONFIG_CMD_USB=y
>> # CONFIG_CMD_FPGA is not set
>> CONFIG_CMD_GPIO=y
>> CONFIG_CMD_RARP=y
>> @@ -28,6 +29,9 @@ CONFIG_DM_ETH=y
>> CONFIG_PIC32_ETH=y
>> CONFIG_PINCTRL=y
>> # CONFIG_PINCTRL_FULL is not set
>> -CONFIG_SYS_VSNPRINTF=y
>> +CONFIG_USB=y
>> +CONFIG_DM_USB=y
>> +CONFIG_USB_MUSB_HOST=y
>> +CONFIG_USB_STORAGE=y
>> CONFIG_USE_TINY_PRINTF=y
>> CONFIG_CMD_DHRYSTONE=y
>> diff --git a/include/configs/pic32mzdask.h b/include/configs/pic32mzdask.h
>> index 2d35a0b..1d5be2b 100644
>> --- a/include/configs/pic32mzdask.h
>> +++ b/include/configs/pic32mzdask.h
>> @@ -117,6 +117,12 @@
>> #define CONFIG_GENERIC_MMC
>> #define CONFIG_CMD_MMC
>>
>> +/*--------------------------------------------------
>> + * USB Configuration
>> + */
>> +#define CONFIG_USB_MUSB_PIO_ONLY
>> +#define CONFIG_SYS_CACHELINE_SIZE 16
>
> I see CONFIG_SYS_CACHELINE_SIZE is used in drivers/usb/ in various memalign() calls. Actually we have ARCH_DMA_MINALIGN for this case. At least for MIPS I want to get rid of CONFIG_SYS_CACHELINE_SIZE in the future becasue we have auto-detection for that.
>
> If possible I'd like to see a patch which replaces CONFIG_SYS_CACHELINE_SIZE with ARCH_DMA_MINALIGN in drivers/user/. Marek what do you think?
I think that makes sense.
>> +
>> /*-----------------------------------------------------------------------
>> * File System Configuration
>> */
>> @@ -167,6 +173,7 @@
>>
>> #define BOOT_TARGET_DEVICES(func) \
>> func(MMC, mmc, 0) \
>> + func(USB, usb, 0) \
>> func(DHCP, dhcp, na)
>>
>> #include <config_distro_bootcmd.h>
>>
>
--
Best regards,
Marek Vasut
prev parent reply other threads:[~2016-03-16 15:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 12:44 [U-Boot] [PATCH v3 1/4] arm: add missing writes{bwql}, reads{bwql} Purna Chandra Mandal
2016-03-15 12:44 ` [U-Boot] [PATCH v3 2/4] drivers: musb-new: remove writes{bwlq} and reads{bwlq} Purna Chandra Mandal
2016-03-15 18:10 ` Marek Vasut
2016-03-16 6:36 ` Purna Chandra Mandal
2016-03-16 15:44 ` Marek Vasut
2016-03-15 12:44 ` [U-Boot] [PATCH v3 3/4] drivers: musb-new: Add USB DRC driver for Microchip PIC32 OTG controller Purna Chandra Mandal
2016-03-15 18:19 ` Marek Vasut
2016-03-16 9:58 ` Purna Chandra Mandal
2016-03-16 15:48 ` Marek Vasut
2016-03-17 9:58 ` Purna Chandra Mandal
2016-03-17 11:31 ` Marek Vasut
2016-03-15 12:44 ` [U-Boot] [PATCH v3 4/4] board: pic32mzda: enable USB-host, USB-storage support Purna Chandra Mandal
2016-03-16 9:12 ` Daniel Schwierzeck
2016-03-16 15:49 ` Marek Vasut [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56E9809C.7030100@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox