xshoudu

xshoudu

0个粉丝

24

问答

0

专栏

0

资料

xshoudu  发布于  2017-09-29 11:51:10
采纳率 0%
24个问答
3693

3536使用single模式时,在主CPU上启用uart2和uart3的内核修改方法!

 
使用单CPU模式下,在主CPU内中启用uart2和uart3,‘+’部分为新增内容
1、kernel\linux-3.10.y\arch\arm\mach-hi3536/core.c
HIL_AMBA_DEVICE(uart0, "uart:0",  UART0,    NULL);
HIL_AMBA_DEVICE(uart1, "uart:1",  UART1,    NULL);
+ HIL_AMBA_DEVICE(uart2, "uart:2",  UART2,    NULL);
+ HIL_AMBA_DEVICE(uart3, "uart:3",  UART3,    NULL);

static struct amba_device *amba_devs[] __initdata = {
        &HIL_AMBADEV_NAME(uart0),
        &HIL_AMBADEV_NAME(uart1),
        + &HIL_AMBADEV_NAME(uart2),
        + &HIL_AMBADEV_NAME(uart3),
};

static struct clk_lookup lookups[] = {
        {
                /* UART0 */
                .dev_id                = "uart:0",
                .clk                = &uart_clk,
        },
        {
                /* UART1 */
                .dev_id                = "uart:1",
                .clk                = &uart_clk,
        },
+ /////////////////////////////////新增////////////////////////////////
        {
                /* UART2 */
                .dev_id                = "uart:2",
                .clk                = &uart_clk,
        },
        {
                /* UART3 */
                .dev_id                = "uart:3",
                .clk                = &uart_clk,
        },
/////////////////////////////////////////////////////////////////////
        { /* SP804 timers */
                .dev_id                = "sp804",
                .clk                = &sp804_clk,
        },

kernel\linux-3.10.y\arch\arm\mach-hi3536\include\mach/platform.h

#define REG_BASE_UART0                                  0x12080000
#define REG_BASE_UART1                                  0x12090000
+ #define REG_BASE_UART2                                  0x120A0000
+ #define REG_BASE_UART3                                  0x120B0000

kernel\linux-3.10.y\include\linux\amba/bus.h

- #define AMBA_NR_IRQS        2
+ #define AMBA_NR_IRQS        4
#define AMBA_CID        0xb105f00d
struct clk;
struct amba_device {
        struct device                dev;
        struct resource                res;
        struct clk                *pclk;
        u64                        dma_mask;
        unsigned int                periphid;
        unsigned int                irq[AMBA_NR_IRQS];
};
我来回答
回答4个
时间排序
认可量排序

szhansen

0个粉丝

4

问答

0

专栏

0

资料

szhansen 2017-09-30 09:20:12
认可0
nice~            

贺鹏程

0个粉丝

0

问答

0

专栏

0

资料

贺鹏程 2017-10-09 10:18:42
认可0
没有成功,内核替换后,系统启动就崩溃了

贺鹏程

0个粉丝

0

问答

0

专栏

0

资料

贺鹏程 2017-10-09 10:19:15
认可0
U-Boot 2010.06 (Aug 08 2017 - 11:29:53)

Check SPI Nand Flash Controller v100 ... Found
SPI Nand ID Table Version 1.9
SPI Nand : Manufacturer ID[0xc2] Device ID[0x12 0x0]
Block:128KB Page:2KB Chip:128MB*1 OOB:64B ECC:4bit/512
Nand total size: 128MB
In:    serial
Out:   serial
Err:   serial
USB:   Starting the controller
scanning bus for devices... 1 USB Device(s) found
0 Storage Device(s) found

NAND read: device 0 offset 0x100000, size 0x100000
1048576 bytes read: OK
jpeg decoding ...
<>
mmu_enable
PicType: 6 ,Output Addr, Y: 43800000,UV: 438c0000
<>
decode success!!!!
decode jpeg!
stMaxRect.u32Width1024, stMaxRect.u32Height768.
HDMI_INFO:DispFmt2HdmiTiming[377] ,Non CEA video timing:17
HDMI_INFO:Hdmi_PixelFreqSearch[120] ,u32Fmt17.
dev 0 opened!
video layer 0 opened!
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x200000, size 0x400000
4194304 bytes read: OK
## Booting kernel from Legacy Image at 42000000 ...
   Image Name:   Linux-3.10.0_hi3536
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3862672 Bytes = 3.7 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.10.0_hi3536 ([email]hepengcheng@localhost.localdomain[/email]) (gcc version 4.8.3 20131202 (prerelease) (Hisilicon_v300) ) #5 SMP Mon Oct 9 11:13:21 CST 2017
CPU: ARMv7 Processor [411fc0e1] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: hi3536
Memory policy: ECC disabled, Data cache writealloc
PERCPU: Embedded 8 pages/cpu @c0f54000 s8448 r8192 d16128 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260624
Kernel command line: mem=1024M console=ttyAMA0,115200 root=/dev/mtdblock3 rootfstype=yaffs2 mtdparts=hinand:1M(boot),1M(logo),4M(kernel),122M(rootfs)
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1024MB = 1024MB total
Memory: 1031952k/1031952k available, 16624k reserved, 270336K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
    lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc06bb928   (6863 kB)
      .init : 0xc06bc000 - 0xc06eb100   ( 189 kB)
      .data : 0xc06ec000 - 0xc0724bc0   ( 227 kB)
       .bss : 0xc0724bc0 - 0xc074ce8c   ( 161 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:160
sched_clock: 32 bits at 125MHz, resolution 8ns, wraps every 34359ms
Console: colour dummy device 80x30
Calibrating delay loop... 2786.91 BogoMIPS (lpj=13934592)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0xc05265f0 - 0xc0526648
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
CPU2: Booted secondary processor
CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
CPU3: Booted secondary processor
CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
Brought up 4 CPUs
SMP: Total of 4 processors activated (11167.33 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
Serial: AMBA PL011 UART driver
uart:0: ttyAMA0 at MMIO 0x12080000 (irq = 38) is a PL011 rev2
console [ttyAMA0] enabled
uart:1: ttyAMA1 at MMIO 0x12090000 (irq = 39) is a PL011 rev2
uart:2: ttyAMA2 at MMIO 0x120a0000 (irq = 40) is a PL011 rev2
uart:3: ttyAMA3 at MMIO 0x120b0000 (irq = 41) is a PL011 rev2
bio: create slab at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource timer0
cfg80211: Calling CRDA to update world regulatory domain
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP: reno registered
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
CPU PMU: probing PMU on CPU 3
CPU PMU: failed to probe PMU!
CPU PMU: failed to register PMU devices!bounce pool size: 64 pages
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.22)
SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
msgmni has been set to 1487
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
brd: module loaded
hiahci: initializing
ahci ahci.0: can't get clock
ahci: SSS flag set, parallel bus scan disabled
ahci ahci.0: AHCI 0001.0300 32 slots 4 ports 6 Gbps 0xf impl platform mode
ahci ahci.0: flags: ncq sntf stag pm led clo only pmp fbs slum part ccc sxs boh
scsi0 : ahci_platform
scsi1 : ahci_platform
scsi2 : ahci_platform
scsi3 : ahci_platform
ata1: SATA max UDMA/133 mmio [mem 0x11010000-0x1101ffff] port 0x100 irq 59
ata2: SATA max UDMA/133 mmio [mem 0x11010000-0x1101ffff] port 0x180 irq 59
ata3: SATA max UDMA/133 mmio [mem 0x11010000-0x1101ffff] port 0x200 irq 59
ata4: SATA max UDMA/133 mmio [mem 0x11010000-0x1101ffff] port 0x280 irq 59
Found SPI Nand Flash Controller v100.
SPI Nand ID Table Version 1.8
SPI Nand : Manufacturer ID[0xc2]
Device ID[0x12 0xc2]
Nand: MXIC MX35LF1GE4AB
Nand(Hardware): Block:128KB Page:2KB OOB:64B ECC:4bit/512B Chip:128MB*1
NAND_ECC_NONE selected by board driver. This is not recommended!
4 cmdlinepart partitions found on MTD device hinand
4 cmdlinepart partitions found on MTD device hinand
Creating 4 MTD partitions on "hinand":
0x000000000000-0x000000100000 : "boot"
0x000000100000-0x000000200000 : "logo"
0x000000200000-0x000000600000 : "kernel"
0x000000600000-0x000008000000 : "rootfs"
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
before uhci_hcd and ohci_hcd, not after
hiusb-ehci hiusb-ehci.0: HIUSB EHCI
hiusb-ehci hiusb-ehci.0: new USB bus registered, assigned bus number 1
hiusb-ehci hiusb-ehci.0: irq 53, io mem 0x10040000
hiusb-ehci hiusb-ehci.0: USB 0.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
hiusb-ohci hiusb-ohci.0: HIUSB OHCI
hiusb-ohci hiusb-ohci.0: new USB bus registered, assigned bus number 2
hiusb-ohci hiusb-ohci.0: irq 52, io mem 0x10030000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ata1: SATA link down (SStatus 0 SControl 300)
hiusb-xhci hiusb-xhci.0: xHCI Host Controller
hiusb-xhci hiusb-xhci.0: new USB bus registered, assigned bus number 3
hiusb-xhci hiusb-xhci.0: irq 60, io mem 0x11040000
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
hiusb-xhci hiusb-xhci.0: xHCI Host Controller
hiusb-xhci hiusb-xhci.0: new USB bus registered, assigned bus number 4
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
hisi_i2c hisi_i2c.0: Hisilicon [i2c-0] probed!
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
hi_iommu_probe:966: begin
hi_iommu_probe iores_start:131f0000
oprofile: no performance counters
oprofile: using timer interrupt.
TCP: cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 10
NET: Registered protocol family 17
NET: Registered protocol family 15
VFP support v0.3: implementor 41 architecture 3 part 30 variant e rev 0
registered taskstats version 1
ata2: SATA link down (SStatus 0 SControl 300)
ata3: SATA link down (SStatus 0 SControl 300)
ata4: SATA link down (SStatus 0 SControl 300)
yaffs: dev is 32505859 name is "mtdblock3" rw
yaffs: passed flags ""
VFS: Mounted root (yaffs2 filesystem) on device 31:3.
Freeing unused kernel memory: 188K (c06bc000 - c06eb000)
Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
CPU0: stopping
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0_hi3536 #5
[] (unwind_backtrace+0x0/0xf4) from [] (show_stack+0x10/0x14)
[] (show_stack+0x10/0x14) from [] (handle_IPI+0x188/0x1b0)
[] (handle_IPI+0x188/0x1b0) from [] (gic_handle_irq+0x88/0x8c)
[] (gic_handle_irq+0x88/0x8c) from [] (__irq_svc+0x40/0x50)
Exception stack(0xc06edf68 to 0xc06edfb0)
df60:                   c0f54930 00000000 00000578 00000000 c0724a65 c06fbd50
df80: c0528eac c06ec000 c0724a65 c06ec000 c06ec000 c06fbcf0 00000000 c06edfb0
dfa0: c00142a4 c00142a8 60000113 ffffffff
[] (__irq_svc+0x40/0x50) from [] (arch_cpu_idle+0x2c/0x30)
[] (arch_cpu_idle+0x2c/0x30) from [] (cpu_startup_entry+0xfc/0x140)
[] (cpu_startup_entry+0xfc/0x140) from [] (start_kernel+0x30c/0x318)
CPU3: stopping
CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.10.0_hi3536 #5
[] (unwind_backtrace+0x0/0xf4) from [] (show_stack+0x10/0x14)
[] (show_stack+0x10/0x14) from [] (handle_IPI+0x188/0x1b0)
[] (handle_IPI+0x188/0x1b0) from [] (gic_handle_irq+0x88/0x8c)
[] (gic_handle_irq+0x88/0x8c) from [] (__irq_svc+0x40/0x50)
Exception stack(0xef07bf98 to 0xef07bfe0)
bf80:                                                       c0f6c930 00000000
bfa0: 00000596 00000000 c0724a65 c06fbd50 c0528eac ef07a000 c0724a65 ef07a000
bfc0: ef07a000 c06fbcf0 00000000 ef07bfe0 c00142a4 c00142a8 60000113 ffffffff
[] (__irq_svc+0x40/0x50) from [] (arch_cpu_idle+0x2c/0x30)
[] (arch_cpu_idle+0x2c/0x30) from [] (cpu_startup_entry+0xfc/0x140)
[] (cpu_startup_entry+0xfc/0x140) from [<4051a544>] (0x4051a544)
CPU1: stopping
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.10.0_hi3536 #5
[] (unwind_backtrace+0x0/0xf4) from [] (show_stack+0x10/0x14)
[] (show_stack+0x10/0x14) from [] (handle_IPI+0x188/0x1b0)
[] (handle_IPI+0x188/0x1b0) from [] (gic_handle_irq+0x88/0x8c)
[] (gic_handle_irq+0x88/0x8c) from [] (__irq_svc+0x40/0x50)
Exception stack(0xef077f98 to 0xef077fe0)
7f80:                                                       c0f5c930 00000000
7fa0: 000007d0 00000000 c0724a65 c06fbd50 c0528eac ef076000 c0724a65 ef076000
7fc0: ef076000 c06fbcf0 00000000 ef077fe0 c00142a4 c00142a8 60000113 ffffffff
[] (__irq_svc+0x40/0x50) from [] (arch_cpu_idle+0x2c/0x30)
[] (arch_cpu_idle+0x2c/0x30) from [] (cpu_startup_entry+0xfc/0x140)
[] (cpu_startup_entry+0xfc/0x140) from [<4051a544>] (0x4051a544)

hero

0个粉丝

1

问答

0

专栏

0

资料

hero 2017-09-29 13:48:05
认可0
:):):):):):):):)
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区