···11+CAN Device Tree Bindings22+------------------------33+2011 Freescale Semiconductor, Inc.44+55+fsl,flexcan-v1.0 nodes66+-----------------------77+In addition to the required compatible-, reg- and interrupt-properties, you can88+also specify which clock source shall be used for the controller.99+1010+CPI Clock- Can Protocol Interface Clock1111+ This CLK_SRC bit of CTRL(control register) selects the clock source to1212+ the CAN Protocol Interface(CPI) to be either the peripheral clock1313+ (driven by the PLL) or the crystal oscillator clock. The selected clock1414+ is the one fed to the prescaler to generate the Serial Clock (Sclock).1515+ The PRESDIV field of CTRL(control register) controls a prescaler that1616+ generates the Serial Clock (Sclock), whose period defines the1717+ time quantum used to compose the CAN waveform.1818+1919+Can Engine Clock Source2020+ There are two sources for CAN clock2121+ - Platform Clock It represents the bus clock2222+ - Oscillator Clock2323+2424+ Peripheral Clock (PLL)2525+ --------------2626+ |2727+ --------- -------------2828+ | |CPI Clock | Prescaler | Sclock2929+ | |---------------->| (1.. 256) |------------>3030+ --------- -------------3131+ | |3232+ -------------- ---------------------CLK_SRC3333+ Oscillator Clock3434+3535+- fsl,flexcan-clock-source : CAN Engine Clock Source.This property selects3636+ the peripheral clock. PLL clock is fed to the3737+ prescaler to generate the Serial Clock (Sclock).3838+ Valid values are "oscillator" and "platform"3939+ "oscillator": CAN engine clock source is oscillator clock.4040+ "platform" The CAN engine clock source is the bus clock4141+ (platform clock).4242+4343+- fsl,flexcan-clock-divider : for the reference and system clock, an additional4444+ clock divider can be specified.4545+- clock-frequency: frequency required to calculate the bitrate for FlexCAN.4646+4747+Note:4848+ - v1.0 of flexcan-v1.0 represent the IP block version for P1010 SOC.4949+ - P1010 does not have oscillator as the Clock Source.So the default5050+ Clock Source is platform clock.5151+Examples:5252+5353+ can0@1c000 {5454+ compatible = "fsl,flexcan-v1.0";5555+ reg = <0x1c000 0x1000>;5656+ interrupts = <48 0x2>;5757+ interrupt-parent = <&mpic>;5858+ fsl,flexcan-clock-source = "platform";5959+ fsl,flexcan-clock-divider = <2>;6060+ clock-frequency = <fixed by u-boot>;6161+ };
···11+Integrated Flash Controller22+33+Properties:44+- name : Should be ifc55+- compatible : should contain "fsl,ifc". The version of the integrated66+ flash controller can be found in the IFC_REV register at77+ offset zero.88+99+- #address-cells : Should be either two or three. The first cell is the1010+ chipselect number, and the remaining cells are the1111+ offset into the chipselect.1212+- #size-cells : Either one or two, depending on how large each chipselect1313+ can be.1414+- reg : Offset and length of the register set for the device1515+- interrupts : IFC has two interrupts. The first one is the "common"1616+ interrupt(CM_EVTER_STAT), and second is the NAND interrupt1717+ (NAND_EVTER_STAT).1818+1919+- ranges : Each range corresponds to a single chipselect, and covers2020+ the entire access window as configured.2121+2222+Child device nodes describe the devices connected to IFC such as NOR (e.g.2323+cfi-flash) and NAND (fsl,ifc-nand). There might be board specific devices2424+like FPGAs, CPLDs, etc.2525+2626+Example:2727+2828+ ifc@ffe1e000 {2929+ compatible = "fsl,ifc", "simple-bus";3030+ #address-cells = <2>;3131+ #size-cells = <1>;3232+ reg = <0x0 0xffe1e000 0 0x2000>;3333+ interrupts = <16 2 19 2>;3434+3535+ /* NOR, NAND Flashes and CPLD on board */3636+ ranges = <0x0 0x0 0x0 0xee000000 0x020000003737+ 0x1 0x0 0x0 0xffa00000 0x000100003838+ 0x3 0x0 0x0 0xffb00000 0x00020000>;3939+4040+ flash@0,0 {4141+ #address-cells = <1>;4242+ #size-cells = <1>;4343+ compatible = "cfi-flash";4444+ reg = <0x0 0x0 0x2000000>;4545+ bank-width = <2>;4646+ device-width = <1>;4747+4848+ partition@0 {4949+ /* 32MB for user data */5050+ reg = <0x0 0x02000000>;5151+ label = "NOR Data";5252+ };5353+ };5454+5555+ flash@1,0 {5656+ #address-cells = <1>;5757+ #size-cells = <1>;5858+ compatible = "fsl,ifc-nand";5959+ reg = <0x1 0x0 0x10000>;6060+6161+ partition@0 {6262+ /* This location must not be altered */6363+ /* 1MB for u-boot Bootloader Image */6464+ reg = <0x0 0x00100000>;6565+ label = "NAND U-Boot Image";6666+ read-only;6767+ };6868+ };6969+7070+ cpld@3,0 {7171+ #address-cells = <1>;7272+ #size-cells = <1>;7373+ compatible = "fsl,p1010rdb-cpld";7474+ reg = <0x3 0x0 0x000001f>;7575+ };7676+ };
···11+* Freescale MPIC timers22+33+Required properties:44+- compatible: "fsl,mpic-global-timer"55+66+- reg : Contains two regions. The first is the main timer register bank77+ (GTCCRxx, GTBCRxx, GTVPRxx, GTDRxx). The second is the timer control88+ register (TCRx) for the group.99+1010+- fsl,available-ranges: use <start count> style section to define which1111+ timer interrupts can be used. This property is optional; without this,1212+ all timers within the group can be used.1313+1414+- interrupts: one interrupt per timer in the group, in order, starting1515+ with timer zero. If timer-available-ranges is present, only the1616+ interrupts that correspond to available timers shall be present.1717+1818+Example:1919+ /* Note that this requires #interrupt-cells to be 4 */2020+ timer0: timer@41100 {2121+ compatible = "fsl,mpic-global-timer";2222+ reg = <0x41100 0x100 0x41300 4>;2323+2424+ /* Another AMP partition is using timers 0 and 1 */2525+ fsl,available-ranges = <2 2>;2626+2727+ interrupts = <2 0 3 02828+ 3 0 3 0>;2929+ };3030+3131+ timer1: timer@42100 {3232+ compatible = "fsl,mpic-global-timer";3333+ reg = <0x42100 0x100 0x42300 4>;3434+ interrupts = <4 0 3 03535+ 5 0 3 03636+ 6 0 3 03737+ 7 0 3 0>;3838+ };
···104104CONFIG_PARTITION_ADVANCED=y105105CONFIG_DEBUG_KERNEL=y106106CONFIG_DETECT_HUNG_TASK=y107107-# CONFIG_DEBUG_BUGVERBOSE is not set108107# CONFIG_RCU_CPU_STALL_DETECTOR is not set109108CONFIG_SYSCTL_SYSCALL_CHECK=y110109CONFIG_CRYPTO_PCBC=m
-1
arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
···101101CONFIG_PARTITION_ADVANCED=y102102CONFIG_DEBUG_KERNEL=y103103CONFIG_DETECT_HUNG_TASK=y104104-# CONFIG_DEBUG_BUGVERBOSE is not set105104# CONFIG_RCU_CPU_STALL_DETECTOR is not set106105CONFIG_SYSCTL_SYSCALL_CHECK=y107106CONFIG_CRYPTO_PCBC=m
-1
arch/powerpc/configs/85xx/mpc8540_ads_defconfig
···5858CONFIG_DEBUG_KERNEL=y5959CONFIG_DETECT_HUNG_TASK=y6060CONFIG_DEBUG_MUTEXES=y6161-# CONFIG_DEBUG_BUGVERBOSE is not set6261# CONFIG_RCU_CPU_STALL_DETECTOR is not set6362CONFIG_SYSCTL_SYSCALL_CHECK=y6463# CONFIG_CRYPTO_ANSI_CPRNG is not set
-1
arch/powerpc/configs/85xx/mpc8560_ads_defconfig
···5959CONFIG_DEBUG_KERNEL=y6060CONFIG_DETECT_HUNG_TASK=y6161CONFIG_DEBUG_MUTEXES=y6262-# CONFIG_DEBUG_BUGVERBOSE is not set6362# CONFIG_RCU_CPU_STALL_DETECTOR is not set6463CONFIG_SYSCTL_SYSCALL_CHECK=y6564# CONFIG_CRYPTO_ANSI_CPRNG is not set
-1
arch/powerpc/configs/85xx/mpc85xx_cds_defconfig
···6363CONFIG_DEBUG_KERNEL=y6464CONFIG_DETECT_HUNG_TASK=y6565CONFIG_DEBUG_MUTEXES=y6666-# CONFIG_DEBUG_BUGVERBOSE is not set6766# CONFIG_RCU_CPU_STALL_DETECTOR is not set6867CONFIG_SYSCTL_SYSCALL_CHECK=y6968# CONFIG_CRYPTO_ANSI_CPRNG is not set
-1
arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
···168168CONFIG_CRC_T10DIF=y169169CONFIG_DEBUG_KERNEL=y170170CONFIG_DETECT_HUNG_TASK=y171171-# CONFIG_DEBUG_BUGVERBOSE is not set172171CONFIG_DEBUG_INFO=y173172# CONFIG_RCU_CPU_STALL_DETECTOR is not set174173CONFIG_SYSCTL_SYSCALL_CHECK=y
+29-10
arch/powerpc/configs/e55xx_smp_defconfig
···66CONFIG_EXPERIMENTAL=y77CONFIG_SYSVIPC=y88CONFIG_BSD_PROCESS_ACCT=y99+CONFIG_SPARSE_IRQ=y910CONFIG_IKCONFIG=y1011CONFIG_IKCONFIG_PROC=y1112CONFIG_LOG_BUF_SHIFT=141212-CONFIG_SYSFS_DEPRECATED_V2=y1313CONFIG_BLK_DEV_INITRD=y1414# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set1515CONFIG_EXPERT=y···2525CONFIG_NO_HZ=y2626CONFIG_HIGH_RES_TIMERS=y2727CONFIG_BINFMT_MISC=m2828-CONFIG_SPARSE_IRQ=y2928# CONFIG_PCI is not set2929+CONFIG_NET=y3030+CONFIG_PACKET=y3131+CONFIG_UNIX=y3232+CONFIG_XFRM_USER=y3333+CONFIG_NET_KEY=y3434+CONFIG_INET=y3535+CONFIG_IP_MULTICAST=y3636+CONFIG_IP_ADVANCED_ROUTER=y3737+CONFIG_IP_MULTIPLE_TABLES=y3838+CONFIG_IP_ROUTE_MULTIPATH=y3939+CONFIG_IP_ROUTE_VERBOSE=y4040+CONFIG_IP_PNP=y4141+CONFIG_IP_PNP_DHCP=y4242+CONFIG_IP_PNP_BOOTP=y4343+CONFIG_IP_PNP_RARP=y4444+CONFIG_NET_IPIP=y4545+CONFIG_IP_MROUTE=y4646+CONFIG_IP_PIMSM_V1=y4747+CONFIG_IP_PIMSM_V2=y4848+CONFIG_ARPD=y4949+CONFIG_INET_ESP=y5050+# CONFIG_INET_XFRM_MODE_BEET is not set5151+# CONFIG_INET_LRO is not set5252+CONFIG_IPV6=y5353+CONFIG_IP_SCTP=m3054CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"3155CONFIG_PROC_DEVICETREE=y3256CONFIG_BLK_DEV_LOOP=y···5834CONFIG_BLK_DEV_RAM_SIZE=1310725935CONFIG_MISC_DEVICES=y6036CONFIG_EEPROM_LEGACY=y3737+CONFIG_NETDEVICES=y3838+CONFIG_DUMMY=y3939+CONFIG_NET_ETHERNET=y6140CONFIG_INPUT_FF_MEMLESS=m6241# CONFIG_INPUT_MOUSEDEV is not set6342# CONFIG_INPUT_KEYBOARD is not set···9164CONFIG_NLS_UTF8=m9265CONFIG_CRC_T10DIF=y9366CONFIG_CRC_ITU_T=m9494-CONFIG_LIBCRC32C=m9567CONFIG_FRAME_WARN=10249668CONFIG_DEBUG_FS=y9769CONFIG_DEBUG_KERNEL=y9870CONFIG_DETECT_HUNG_TASK=y9999-# CONFIG_DEBUG_BUGVERBOSE is not set10071CONFIG_DEBUG_INFO=y10172# CONFIG_RCU_CPU_STALL_DETECTOR is not set10273CONFIG_SYSCTL_SYSCALL_CHECK=y10374CONFIG_VIRQ_DEBUG=y104104-CONFIG_CRYPTO=y105105-CONFIG_CRYPTO_CBC=y10675CONFIG_CRYPTO_PCBC=m107107-CONFIG_CRYPTO_HMAC=y108108-CONFIG_CRYPTO_MD5=y109109-CONFIG_CRYPTO_SHA1=m110110-CONFIG_CRYPTO_DES=y11176# CONFIG_CRYPTO_ANSI_CPRNG is not set11277CONFIG_CRYPTO_DEV_TALITOS=y
-1
arch/powerpc/configs/mpc85xx_defconfig
···204204CONFIG_DEBUG_FS=y205205CONFIG_DEBUG_KERNEL=y206206CONFIG_DETECT_HUNG_TASK=y207207-# CONFIG_DEBUG_BUGVERBOSE is not set208207CONFIG_DEBUG_INFO=y209208# CONFIG_RCU_CPU_STALL_DETECTOR is not set210209CONFIG_SYSCTL_SYSCALL_CHECK=y
-1
arch/powerpc/configs/mpc85xx_smp_defconfig
···206206CONFIG_DEBUG_FS=y207207CONFIG_DEBUG_KERNEL=y208208CONFIG_DETECT_HUNG_TASK=y209209-# CONFIG_DEBUG_BUGVERBOSE is not set210209CONFIG_DEBUG_INFO=y211210# CONFIG_RCU_CPU_STALL_DETECTOR is not set212211CONFIG_SYSCTL_SYSCALL_CHECK=y
-1
arch/powerpc/configs/mpc86xx_defconfig
···171171CONFIG_CRC_T10DIF=y172172CONFIG_DEBUG_KERNEL=y173173CONFIG_DETECT_HUNG_TASK=y174174-# CONFIG_DEBUG_BUGVERBOSE is not set175174CONFIG_DEBUG_INFO=y176175# CONFIG_RCU_CPU_STALL_DETECTOR is not set177176CONFIG_SYSCTL_SYSCALL_CHECK=y
···253253 .balign 0x1000254254 .globl interrupt_base_book3e255255interrupt_base_book3e: /* fake trap */256256- /* Note: If real debug exceptions are supported by the HW, the vector257257- * below will have to be patched up to point to an appropriate handler258258- */259256 EXCEPTION_STUB(0x000, machine_check) /* 0x0200 */260257 EXCEPTION_STUB(0x020, critical_input) /* 0x0580 */261258 EXCEPTION_STUB(0x040, debug_crit) /* 0x0d00 */···269272 EXCEPTION_STUB(0x1a0, watchdog) /* 0x09f0 */270273 EXCEPTION_STUB(0x1c0, data_tlb_miss)271274 EXCEPTION_STUB(0x1e0, instruction_tlb_miss)275275+ EXCEPTION_STUB(0x260, perfmon)272276 EXCEPTION_STUB(0x280, doorbell)273277 EXCEPTION_STUB(0x2a0, doorbell_crit)278278+ EXCEPTION_STUB(0x2c0, guest_doorbell)279279+ EXCEPTION_STUB(0x2e0, guest_doorbell_crit)280280+ EXCEPTION_STUB(0x300, hypercall)281281+ EXCEPTION_STUB(0x320, ehpriv)274282275283 .globl interrupt_end_book3e276284interrupt_end_book3e:···457455kernel_dbg_exc:458456 b . /* NYI */459457458458+/* Debug exception as a debug interrupt*/459459+ START_EXCEPTION(debug_debug);460460+ DBG_EXCEPTION_PROLOG(0xd00, PROLOG_ADDITION_2REGS)461461+462462+ /*463463+ * If there is a single step or branch-taken exception in an464464+ * exception entry sequence, it was probably meant to apply to465465+ * the code where the exception occurred (since exception entry466466+ * doesn't turn off DE automatically). We simulate the effect467467+ * of turning off DE on entry to an exception handler by turning468468+ * off DE in the DSRR1 value and clearing the debug status.469469+ */470470+471471+ mfspr r14,SPRN_DBSR /* check single-step/branch taken */472472+ andis. r15,r14,DBSR_IC@h473473+ beq+ 1f474474+475475+ LOAD_REG_IMMEDIATE(r14,interrupt_base_book3e)476476+ LOAD_REG_IMMEDIATE(r15,interrupt_end_book3e)477477+ cmpld cr0,r10,r14478478+ cmpld cr1,r10,r15479479+ blt+ cr0,1f480480+ bge+ cr1,1f481481+482482+ /* here it looks like we got an inappropriate debug exception. */483483+ lis r14,DBSR_IC@h /* clear the IC event */484484+ rlwinm r11,r11,0,~MSR_DE /* clear DE in the DSRR1 value */485485+ mtspr SPRN_DBSR,r14486486+ mtspr SPRN_DSRR1,r11487487+ lwz r10,PACA_EXDBG+EX_CR(r13) /* restore registers */488488+ ld r1,PACA_EXDBG+EX_R1(r13)489489+ ld r14,PACA_EXDBG+EX_R14(r13)490490+ ld r15,PACA_EXDBG+EX_R15(r13)491491+ mtcr r10492492+ ld r10,PACA_EXDBG+EX_R10(r13) /* restore registers */493493+ ld r11,PACA_EXDBG+EX_R11(r13)494494+ mfspr r13,SPRN_SPRG_DBG_SCRATCH495495+ rfdi496496+497497+ /* Normal debug exception */498498+ /* XXX We only handle coming from userspace for now since we can't499499+ * quite save properly an interrupted kernel state yet500500+ */501501+1: andi. r14,r11,MSR_PR; /* check for userspace again */502502+ beq kernel_dbg_exc; /* if from kernel mode */503503+504504+ /* Now we mash up things to make it look like we are coming on a505505+ * normal exception506506+ */507507+ mfspr r15,SPRN_SPRG_DBG_SCRATCH508508+ mtspr SPRN_SPRG_GEN_SCRATCH,r15509509+ mfspr r14,SPRN_DBSR510510+ EXCEPTION_COMMON(0xd00, PACA_EXDBG, INTS_DISABLE_ALL)511511+ std r14,_DSISR(r1)512512+ addi r3,r1,STACK_FRAME_OVERHEAD513513+ mr r4,r14514514+ ld r14,PACA_EXDBG+EX_R14(r13)515515+ ld r15,PACA_EXDBG+EX_R15(r13)516516+ bl .save_nvgprs517517+ bl .DebugException518518+ b .ret_from_except519519+520520+ MASKABLE_EXCEPTION(0x260, perfmon, .performance_monitor_exception, ACK_NONE)521521+460522/* Doorbell interrupt */461523 MASKABLE_EXCEPTION(0x2070, doorbell, .doorbell_exception, ACK_NONE)462524···534468// bl .doorbell_critical_exception535469// b ret_from_crit_except536470 b .471471+472472+ MASKABLE_EXCEPTION(0x2c0, guest_doorbell, .unknown_exception, ACK_NONE)473473+ MASKABLE_EXCEPTION(0x2e0, guest_doorbell_crit, .unknown_exception, ACK_NONE)474474+ MASKABLE_EXCEPTION(0x310, hypercall, .unknown_exception, ACK_NONE)475475+ MASKABLE_EXCEPTION(0x320, ehpriv, .unknown_exception, ACK_NONE)537476538477539478/*···659588BAD_STACK_TRAMPOLINE(0x000)660589BAD_STACK_TRAMPOLINE(0x100)661590BAD_STACK_TRAMPOLINE(0x200)591591+BAD_STACK_TRAMPOLINE(0x260)592592+BAD_STACK_TRAMPOLINE(0x2c0)593593+BAD_STACK_TRAMPOLINE(0x2e0)662594BAD_STACK_TRAMPOLINE(0x300)595595+BAD_STACK_TRAMPOLINE(0x310)596596+BAD_STACK_TRAMPOLINE(0x320)663597BAD_STACK_TRAMPOLINE(0x400)664598BAD_STACK_TRAMPOLINE(0x500)665599BAD_STACK_TRAMPOLINE(0x600)···1199112312001124 sync1201112511261126+ blr11271127+11281128+_GLOBAL(setup_perfmon_ivor)11291129+ SET_IVOR(35, 0x260) /* Performance Monitor */11301130+ blr11311131+11321132+_GLOBAL(setup_doorbell_ivors)11331133+ SET_IVOR(36, 0x280) /* Processor Doorbell */11341134+ SET_IVOR(37, 0x2a0) /* Processor Doorbell Crit */11351135+11361136+ /* Check MMUCFG[LPIDSIZE] to determine if we have category E.HV */11371137+ mfspr r10,SPRN_MMUCFG11381138+ rlwinm. r10,r10,0,MMUCFG_LPIDSIZE11391139+ beqlr11401140+11411141+ SET_IVOR(38, 0x2c0) /* Guest Processor Doorbell */11421142+ SET_IVOR(39, 0x2e0) /* Guest Processor Doorbell Crit/MC */11431143+ blr11441144+11451145+_GLOBAL(setup_ehv_ivors)11461146+ /*11471147+ * We may be running as a guest and lack E.HV even on a chip11481148+ * that normally has it.11491149+ */11501150+ mfspr r10,SPRN_MMUCFG11511151+ rlwinm. r10,r10,0,MMUCFG_LPIDSIZE11521152+ beqlr11531153+11541154+ SET_IVOR(40, 0x300) /* Embedded Hypervisor System Call */11551155+ SET_IVOR(41, 0x320) /* Embedded Hypervisor Privilege */12021156 blr