Commit d636ef68f9101b77e68e8718d325f443d6cea310
1 parent
d56e51d211
Exists in
smarct3x-processor-sdk-linux-02.00.01
Make tmpdevfs visable at ramfs and add mmc aliases to fix the eMMC and SD device descriptor
Showing 8 changed files with 103 additions and 39 deletions Side-by-side Diff
arch/arm/boot/dts/am335x-smarc-common.dtsi
... | ... | @@ -775,7 +775,18 @@ |
775 | 775 | 2 13>; |
776 | 776 | }; |
777 | 777 | |
778 | +&mmc2 { | |
779 | + vmmc-supply = <&vmmcsd_fixed>; | |
780 | + pinctrl-names = "default"; | |
781 | + pinctrl-0 = <&emmc_pins>; | |
782 | + bus-width = <8>; | |
783 | + status = "okay"; | |
784 | + ti,non-removable; | |
785 | +}; | |
786 | + | |
787 | + | |
778 | 788 | &mmc1 { |
789 | + vmmc-supply = <&vmmcsd_fixed>; | |
779 | 790 | status = "okay"; |
780 | 791 | bus-width = <0x4>; |
781 | 792 | pinctrl-names = "default"; |
arch/arm/boot/dts/am335x-smarct335x.dts
... | ... | @@ -17,18 +17,6 @@ |
17 | 17 | regulator-always-on; |
18 | 18 | }; |
19 | 19 | |
20 | -&mmc1 { | |
21 | - vmmc-supply = <&vmmcsd_fixed>; | |
22 | -}; | |
23 | - | |
24 | -&mmc2 { | |
25 | - vmmc-supply = <&vmmcsd_fixed>; | |
26 | - pinctrl-names = "default"; | |
27 | - pinctrl-0 = <&emmc_pins>; | |
28 | - bus-width = <8>; | |
29 | - status = "okay"; | |
30 | -}; | |
31 | - | |
32 | 20 | &sgx { |
33 | 21 | status = "okay"; |
34 | 22 | }; |
arch/arm/boot/dts/am33xx.dtsi
arch/arm/configs/smarc_t335x_defconfig
... | ... | @@ -1810,10 +1810,6 @@ |
1810 | 1810 | # CONFIG_MICREL_KS8995MA is not set |
1811 | 1811 | # CONFIG_PPP is not set |
1812 | 1812 | # CONFIG_SLIP is not set |
1813 | - | |
1814 | -# | |
1815 | -# Host-side USB support is needed for USB Network Adapter support | |
1816 | -# | |
1817 | 1813 | CONFIG_USB_NET_DRIVERS=m |
1818 | 1814 | # CONFIG_USB_CATC is not set |
1819 | 1815 | # CONFIG_USB_KAWETH is not set |
... | ... | @@ -3443,7 +3439,7 @@ |
3443 | 3439 | CONFIG_USB_SUPPORT=y |
3444 | 3440 | CONFIG_USB_COMMON=y |
3445 | 3441 | CONFIG_USB_ARCH_HAS_HCD=y |
3446 | -CONFIG_USB=m | |
3442 | +CONFIG_USB=y | |
3447 | 3443 | CONFIG_USB_ANNOUNCE_NEW_DEVICES=y |
3448 | 3444 | |
3449 | 3445 | # |
... | ... | @@ -3454,7 +3450,7 @@ |
3454 | 3450 | CONFIG_USB_OTG=y |
3455 | 3451 | # CONFIG_USB_OTG_WHITELIST is not set |
3456 | 3452 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set |
3457 | -CONFIG_USB_MON=m | |
3453 | +CONFIG_USB_MON=y | |
3458 | 3454 | # CONFIG_USB_WUSB_CBAF is not set |
3459 | 3455 | |
3460 | 3456 | # |
... | ... | @@ -3499,7 +3495,7 @@ |
3499 | 3495 | # |
3500 | 3496 | # also be needed; see USB_STORAGE Help for more info |
3501 | 3497 | # |
3502 | -CONFIG_USB_STORAGE=m | |
3498 | +CONFIG_USB_STORAGE=y | |
3503 | 3499 | # CONFIG_USB_STORAGE_DEBUG is not set |
3504 | 3500 | # CONFIG_USB_STORAGE_REALTEK is not set |
3505 | 3501 | # CONFIG_USB_STORAGE_DATAFAB is not set |
3506 | 3502 | |
3507 | 3503 | |
... | ... | @@ -3522,18 +3518,17 @@ |
3522 | 3518 | # CONFIG_USB_MDC800 is not set |
3523 | 3519 | # CONFIG_USB_MICROTEK is not set |
3524 | 3520 | # CONFIG_USBIP_CORE is not set |
3525 | -CONFIG_USB_MUSB_HDRC=m | |
3526 | -# CONFIG_USB_MUSB_HOST is not set | |
3527 | -# CONFIG_USB_MUSB_GADGET is not set | |
3528 | -CONFIG_USB_MUSB_DUAL_ROLE=y | |
3521 | +CONFIG_USB_MUSB_HDRC=y | |
3522 | +CONFIG_USB_MUSB_HOST=y | |
3529 | 3523 | |
3530 | 3524 | # |
3531 | 3525 | # Platform Glue Layer |
3532 | 3526 | # |
3527 | +# CONFIG_USB_MUSB_TUSB6010 is not set | |
3533 | 3528 | CONFIG_USB_MUSB_OMAP2PLUS=m |
3534 | 3529 | CONFIG_USB_MUSB_AM35X=m |
3535 | -CONFIG_USB_MUSB_DSPS=m | |
3536 | -CONFIG_USB_MUSB_AM335X_CHILD=m | |
3530 | +CONFIG_USB_MUSB_DSPS=y | |
3531 | +CONFIG_USB_MUSB_AM335X_CHILD=y | |
3537 | 3532 | # CONFIG_USB_INVENTRA_DMA is not set |
3538 | 3533 | CONFIG_USB_TI_CPPI41_DMA=y |
3539 | 3534 | # CONFIG_MUSB_PIO_ONLY is not set |
... | ... | @@ -3559,7 +3554,57 @@ |
3559 | 3554 | # |
3560 | 3555 | # USB port drivers |
3561 | 3556 | # |
3562 | -# CONFIG_USB_SERIAL is not set | |
3557 | +CONFIG_USB_SERIAL=m | |
3558 | +CONFIG_USB_SERIAL_GENERIC=y | |
3559 | +CONFIG_USB_SERIAL_SIMPLE=m | |
3560 | +# CONFIG_USB_SERIAL_AIRCABLE is not set | |
3561 | +# CONFIG_USB_SERIAL_ARK3116 is not set | |
3562 | +# CONFIG_USB_SERIAL_BELKIN is not set | |
3563 | +# CONFIG_USB_SERIAL_CH341 is not set | |
3564 | +# CONFIG_USB_SERIAL_WHITEHEAT is not set | |
3565 | +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set | |
3566 | +CONFIG_USB_SERIAL_CP210X=m | |
3567 | +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set | |
3568 | +# CONFIG_USB_SERIAL_EMPEG is not set | |
3569 | +CONFIG_USB_SERIAL_FTDI_SIO=m | |
3570 | +# CONFIG_USB_SERIAL_VISOR is not set | |
3571 | +# CONFIG_USB_SERIAL_IPAQ is not set | |
3572 | +# CONFIG_USB_SERIAL_IR is not set | |
3573 | +# CONFIG_USB_SERIAL_EDGEPORT is not set | |
3574 | +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set | |
3575 | +# CONFIG_USB_SERIAL_F81232 is not set | |
3576 | +# CONFIG_USB_SERIAL_GARMIN is not set | |
3577 | +# CONFIG_USB_SERIAL_IPW is not set | |
3578 | +# CONFIG_USB_SERIAL_IUU is not set | |
3579 | +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set | |
3580 | +# CONFIG_USB_SERIAL_KEYSPAN is not set | |
3581 | +# CONFIG_USB_SERIAL_KLSI is not set | |
3582 | +# CONFIG_USB_SERIAL_KOBIL_SCT is not set | |
3583 | +# CONFIG_USB_SERIAL_MCT_U232 is not set | |
3584 | +# CONFIG_USB_SERIAL_METRO is not set | |
3585 | +# CONFIG_USB_SERIAL_MOS7720 is not set | |
3586 | +# CONFIG_USB_SERIAL_MOS7840 is not set | |
3587 | +# CONFIG_USB_SERIAL_MXUPORT is not set | |
3588 | +# CONFIG_USB_SERIAL_NAVMAN is not set | |
3589 | +CONFIG_USB_SERIAL_PL2303=m | |
3590 | +# CONFIG_USB_SERIAL_OTI6858 is not set | |
3591 | +# CONFIG_USB_SERIAL_QCAUX is not set | |
3592 | +# CONFIG_USB_SERIAL_QUALCOMM is not set | |
3593 | +# CONFIG_USB_SERIAL_SPCP8X5 is not set | |
3594 | +# CONFIG_USB_SERIAL_SAFE is not set | |
3595 | +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set | |
3596 | +# CONFIG_USB_SERIAL_SYMBOL is not set | |
3597 | +# CONFIG_USB_SERIAL_TI is not set | |
3598 | +# CONFIG_USB_SERIAL_CYBERJACK is not set | |
3599 | +# CONFIG_USB_SERIAL_XIRCOM is not set | |
3600 | +# CONFIG_USB_SERIAL_OPTION is not set | |
3601 | +# CONFIG_USB_SERIAL_OMNINET is not set | |
3602 | +# CONFIG_USB_SERIAL_OPTICON is not set | |
3603 | +# CONFIG_USB_SERIAL_XSENS_MT is not set | |
3604 | +# CONFIG_USB_SERIAL_WISHBONE is not set | |
3605 | +# CONFIG_USB_SERIAL_SSU100 is not set | |
3606 | +# CONFIG_USB_SERIAL_QT2 is not set | |
3607 | +# CONFIG_USB_SERIAL_DEBUG is not set | |
3563 | 3608 | |
3564 | 3609 | # |
3565 | 3610 | # USB Miscellaneous drivers |
drivers/base/devtmpfs.c
... | ... | @@ -356,7 +356,8 @@ |
356 | 356 | |
357 | 357 | err = sys_mount("devtmpfs", (char *)mntdir, "devtmpfs", MS_SILENT, NULL); |
358 | 358 | if (err) |
359 | - printk(KERN_INFO "devtmpfs: error mounting %i\n", err); | |
359 | + printk(KERN_ERR "devtmpfs: error %i mounting on %s\n", | |
360 | + err, mntdir); | |
360 | 361 | else |
361 | 362 | printk(KERN_INFO "devtmpfs: mounted\n"); |
362 | 363 | return err; |
drivers/mmc/card/block.c
... | ... | @@ -35,6 +35,7 @@ |
35 | 35 | #include <linux/capability.h> |
36 | 36 | #include <linux/compat.h> |
37 | 37 | #include <linux/pm_runtime.h> |
38 | +#include <linux/of.h> | |
38 | 39 | |
39 | 40 | #include <linux/mmc/ioctl.h> |
40 | 41 | #include <linux/mmc/card.h> |
... | ... | @@ -2090,6 +2091,7 @@ |
2090 | 2091 | { |
2091 | 2092 | struct mmc_blk_data *md; |
2092 | 2093 | int devidx, ret; |
2094 | + int idx = 0; | |
2093 | 2095 | |
2094 | 2096 | devidx = find_first_zero_bit(dev_use, max_devices); |
2095 | 2097 | if (devidx >= max_devices) |
... | ... | @@ -2109,7 +2111,20 @@ |
2109 | 2111 | * index anymore so we keep track of a name index. |
2110 | 2112 | */ |
2111 | 2113 | if (!subname) { |
2112 | - md->name_idx = find_first_zero_bit(name_use, max_devices); | |
2114 | + if (card->dev.parent->parent->of_node) | |
2115 | + idx = of_alias_get_id(card->dev.parent->parent->of_node, | |
2116 | + "mmc"); | |
2117 | + | |
2118 | + if (idx < 0) | |
2119 | + md->name_idx = find_first_zero_bit(name_use, | |
2120 | + max_devices); | |
2121 | + else { | |
2122 | + if (test_bit(idx, name_use)) | |
2123 | + md->name_idx = find_first_zero_bit(name_use, | |
2124 | + max_devices); | |
2125 | + else | |
2126 | + md->name_idx = (unsigned int)idx; | |
2127 | + } | |
2113 | 2128 | __set_bit(md->name_idx, name_use); |
2114 | 2129 | } else |
2115 | 2130 | md->name_idx = ((struct mmc_blk_data *) |
init/do_mounts.c
... | ... | @@ -594,7 +594,6 @@ |
594 | 594 | |
595 | 595 | mount_root(); |
596 | 596 | out: |
597 | - devtmpfs_mount("dev"); | |
598 | 597 | sys_mount(".", "/", NULL, MS_MOVE, NULL); |
599 | 598 | sys_chroot("."); |
600 | 599 | } |
601 | 600 | |
... | ... | @@ -609,8 +608,9 @@ |
609 | 608 | if (test_and_set_bit(0, &once)) |
610 | 609 | return ERR_PTR(-ENODEV); |
611 | 610 | |
612 | - if (IS_ENABLED(CONFIG_TMPFS) && is_tmpfs) | |
611 | + if (is_tmpfs) | |
613 | 612 | fill = shmem_fill_super; |
613 | + printk(KERN_INFO "rootfs is %s\n", is_tmpfs ? "tmpfs" : "ramfs"); | |
614 | 614 | |
615 | 615 | return mount_nodev(fs_type, flags, data, fill); |
616 | 616 | } |
617 | 617 | |
... | ... | @@ -632,9 +632,8 @@ |
632 | 632 | (!root_fs_names || strstr(root_fs_names, "tmpfs"))) { |
633 | 633 | err = shmem_init(); |
634 | 634 | is_tmpfs = true; |
635 | - } else { | |
635 | + } else | |
636 | 636 | err = init_ramfs_fs(); |
637 | - } | |
638 | 637 | |
639 | 638 | if (err) |
640 | 639 | unregister_filesystem(&rootfs_fs_type); |
init/main.c
... | ... | @@ -1001,12 +1001,6 @@ |
1001 | 1001 | |
1002 | 1002 | do_basic_setup(); |
1003 | 1003 | |
1004 | - /* Open the /dev/console on the rootfs, this should never fail */ | |
1005 | - if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) | |
1006 | - pr_err("Warning: unable to open an initial console.\n"); | |
1007 | - | |
1008 | - (void) sys_dup(0); | |
1009 | - (void) sys_dup(0); | |
1010 | 1004 | /* |
1011 | 1005 | * check if there is an early userspace init. If yes, let it do all |
1012 | 1006 | * the work |
... | ... | @@ -1018,7 +1012,16 @@ |
1018 | 1012 | if (sys_access((const char __user *) ramdisk_execute_command, 0) != 0) { |
1019 | 1013 | ramdisk_execute_command = NULL; |
1020 | 1014 | prepare_namespace(); |
1021 | - } | |
1015 | + } else if (config_enabled(CONFIG_DEVTMPFS_MOUNT)) | |
1016 | + sys_mkdir("/dev", 0755); | |
1017 | + devtmpfs_mount("dev"); | |
1018 | + | |
1019 | + /* Open the /dev/console on the rootfs, this should never fail */ | |
1020 | + if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) | |
1021 | + pr_err("Warning: unable to open an initial console.\n"); | |
1022 | + | |
1023 | + (void) sys_dup(0); | |
1024 | + (void) sys_dup(0); | |
1022 | 1025 | |
1023 | 1026 | /* |
1024 | 1027 | * Ok, we have completed the initial bootup, and |