Patchwork UBUNTU: config: Make rtc-pl031 static on highbank

login
register
mail settings
Submitter dann frazier
Date Aug. 10, 2012, 9:51 p.m.
Message ID <20120810215148.GA1265@dannf.org>
Download mbox | patch
Permalink /patch/176957/
State New
Headers show

Comments

dann frazier - Aug. 10, 2012, 9:51 p.m.
rtc-pl031 is the driver used for the RTC on the highbank
platform. We build it as a module in precise/quantal, but that makes
it unavailable in early boot, which results in this error message:

/build/buildd/linux-3.2.0/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

And also prevents us from being able to accurately check the
last-mounted time on the root filesystem.

BugLink: https://bugs.launchpad.net/eilt/+bug/1035110

Signed-off-by: dann frazier <dann.frazier@canonical.com>
dann frazier - Aug. 11, 2012, 6:01 p.m.
On Fri, Aug 10, 2012 at 07:45:44PM -0400, Chris Van Hoof wrote:
> On 08/10/2012 05:51 PM, dann frazier wrote:
> >rtc-pl031 is the driver used for the RTC on the highbank
> >platform. We build it as a module in precise/quantal, but that makes
> >it unavailable in early boot, which results in this error message:
> >
> >/build/buildd/linux-3.2.0/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
> 
> Heya Dann -- Resubmitted for both Quantal and Precise based off of
> their respective master-next branches.

Thanks - one other thing that's needed is to prevent the build from
failing when it finds this module was in the previous build but not
the current. I'm not sure the right way to do that - I just removed it
from the list of modules in the previous build. Other than that -
builds and boots fine - and system clock gets set properly as you can
see in the dmesg output below:


Booting Linux on physical CPU 0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 3.5.0-9-highbank (ubuntu@ubuntu) (gcc version 4.7.1 (Ubuntu/Linaro 4.7.1-6ubuntu1) ) #9 SMP PREEMPT Fri Aug 10 18:37:26 CDT 2012 (Ubuntu 3.5.0-9.9-highbank 3.5.0)
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Highbank, model: Calxeda Highbank
cma: CMA: reserved 16 MiB at 2e800000
Memory policy: ECC disabled, Data cache writealloc
On node 0 totalpages: 1046784
free_area_init_node: node 0, pgdat c05fdd80, node_mem_map c1428000
  Normal zone: 1710 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 192850 pages, LIFO batch:31
  HighMem zone: 7491 pages used for memmap
  HighMem zone: 844733 pages, LIFO batch:31
PERCPU: Embedded 7 pages/cpu @c3838000 s6720 r8192 d13760 u32768
pcpu-alloc: s6720 r8192 d13760 u32768 alloc=8*4096
pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 1037583
Kernel command line: initrd=/initrd.img-3.5.0-9-highbank root=UUID=ca0cfc35-a096-489d-81a7-7802e86c54ee console=ttyAMA0 ro nosplash
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)
allocated 8374272 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 4089MB = 4089MB total
Memory: 4113680k/4113680k available, 73456k reserved, 3408896K 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 - 0xc059dd4c   (5720 kB)
      .init : 0xc059e000 - 0xc05cda40   ( 191 kB)
      .data : 0xc05ce000 - 0xc05ff538   ( 198 kB)
       .bss : 0xc05ff55c - 0xc0694990   ( 598 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Preemptible hierarchical RCU implementation.
	RCU dyntick-idle grace-period acceleration is enabled.
NR_IRQS:16 nr_irqs:16 16
L310 cache controller enabled
l2x0: 16 ways, CACHE_ID 0x420000c8, AUX_CTRL 0x7a4b0001, Cache size: 4194304 B
sched_clock: 32 bits at 150MHz, resolution 6ns, wraps every 28633ms
Console: colour dummy device 80x30
Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
pid_max: default: 32768 minimum: 301
Security Framework initialized
AppArmor: AppArmor initialized
Yama: becoming mindful.
Mount-cache hash table entries: 512
Initializing cgroup subsys cpuacct
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys blkio
Initializing cgroup subsys perf_event
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 9, mpidr 80000900
smp_twd: clock not found: -2
Calibrating local timer... 199.94MHz.
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
Setting up static identity map for 0x427ea8 - 0x427f00
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 9, mpidr 80000901
CPU1: Unknown IPI message 0x0
CPU2: Booted secondary processor
CPU2: thread -1, cpu 2, socket 9, mpidr 80000902
CPU2: Unknown IPI message 0x0
CPU3: Booted secondary processor
CPU3: thread -1, cpu 3, socket 9, mpidr 80000903
CPU3: Unknown IPI message 0x0
Brought up 4 CPUs
SMP: Total of 4 processors activated (6376.65 BogoMIPS).
devtmpfs: initialized
dummy: 
NET: Registered protocol family 16
Trying to unpack rootfs image as initramfs...
DMA: preallocated 256 KiB pool for atomic coherent allocations
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
Serial: AMBA PL011 UART driver
fff36000.serial: ttyAMA0 at MMIO 0xfff36000 (irq = 52) is a PL011 rev3
Freeing initrd memory: 4252K
console [ttyAMA0] enabled
bio: create slab <bio-0> at 0
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NetLabel: Initializing
NetLabel:  domain hash size = 128
NetLabel:  protocols = UNLABELED CIPSOv4
NetLabel:  unlabeled traffic allowed by default
Switching to clocksource timer1
AppArmor: AppArmor Filesystem Enabled
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 786432 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
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
audit: initializing netlink socket (disabled)
type=2000 audit(0.890:1): initialized
highmem bounce pool size: 64 pages
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
fuse init (API version 7.19)
msgmni has been set to 1416
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
dma-pl330 fff3d000.dma: Cannot get operation clock.
dma-pl330: probe of fff3d000.dma failed with error -22
uart-pl011 fff36000.serial: no DMA platform data
brd: module loaded
loop: module loaded
ahci: SSS flag set, parallel bus scan disabled
ahci ffe08000.sata: AHCI 0001.0300 32 slots 5 ports 3 Gbps 0x1e impl platform mode
ahci ffe08000.sata: flags: ncq sntf stag pm led clo only pmp pio slum part ccc apst 
scsi0 : ahci_platform
scsi1 : ahci_platform
scsi2 : ahci_platform
scsi3 : ahci_platform
scsi4 : ahci_platform
ata1: DUMMY
ata2: SATA max UDMA/133 mmio [mem 0xffe08000-0xffe17fff] port 0x180 irq 115
ata3: SATA max UDMA/133 mmio [mem 0xffe08000-0xffe17fff] port 0x200 irq 115
ata4: SATA max UDMA/133 mmio [mem 0xffe08000-0xffe17fff] port 0x280 irq 115
ata5: SATA max UDMA/133 mmio [mem 0xffe08000-0xffe17fff] port 0x300 irq 115
Fixed MDIO Bus: probed
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
calxedaxgmac fff50000.ethernet: (unregistered net_device): h/w version is 0x1012
calxedaxgmac fff51000.ethernet: (unregistered net_device): h/w version is 0x1012
PPP generic driver version 2.4.2
usbcore: registered new interface driver libusual
mousedev: PS/2 mouse device common for all mice
input: ipc-keys.2 as /devices/soc.0/ipc-keys.2/input/input0
rtc-pl031 fff35000.rtc: rtc core: registered pl031 as rtc0
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@redhat.com
EDAC MC: Ver: 2.1.0
EDAC MC0: Giving out device to 'fff00000.memory-controller' 'fff00000.memory-controller': DEV (null)
EDAC DEVICE0: Giving out device to module 'fff3c200.sregs' controller '(null)': DEV 'fff3c200.sregs' (INTERRUPT)
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
ashmem: initialized
TCP: cubic registered
NET: Registered protocol family 10
NET: Registered protocol family 17
Key type dns_resolver registered
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
Registering SWP/SWPB emulation handler
Key type encrypted registered
rtc-pl031 fff35000.rtc: setting system clock to 2012-08-11 17:55:14 UTC (1344707714)
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-8: MO0100EBTJT, HPG1, max UDMA/133
ata2.00: 195371568 sectors, multi 8: LBA48 NCQ (depth 31/32)
ata2.00: configured for UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      MO0100EBTJT      HPG1 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 195371568 512-byte logical blocks: (100 GB/93.1 GiB)
sd 1:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2 sda3 < sda5 >
sd 1:0:0:0: [sda] Attached SCSI disk
ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata3.00: ATA-8: MO0100EBTJT, HPG1, max UDMA/133
ata3.00: 195371568 sectors, multi 8: LBA48 NCQ (depth 31/32)
ata3.00: configured for UDMA/133
scsi 2:0:0:0: Direct-Access     ATA      MO0100EBTJT      HPG1 PQ: 0 ANSI: 5
sd 2:0:0:0: [sdb] 195371568 512-byte logical blocks: (100 GB/93.1 GiB)
sd 2:0:0:0: Attached scsi generic sg1 type 0
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdb: sdb1
sd 2:0:0:0: [sdb] Attached SCSI disk
ata4: SATA link down (SStatus 0 SControl 300)
ata5: SATA link down (SStatus 0 SControl 300)
Freeing init memory: 188K
udevd[98]: starting version 175
[...]

Patch

diff -urpN linux-3.5.0.orig/debian.master/config/armel/config.common.armel linux-3.5.0/debian.master/config/armel/config.common.armel
--- linux-3.5.0.orig/debian.master/config/armel/config.common.armel	2012-08-10 16:28:30.000000000 -0500
+++ linux-3.5.0/debian.master/config/armel/config.common.armel	2012-08-10 16:32:55.629993528 -0500
@@ -199,6 +199,7 @@  CONFIG_RELAY=y
 # CONFIG_RT2800USB_UNKNOWN is not set
 CONFIG_RT2X00_LIB_DEBUGFS=y
 CONFIG_RTC_DRV_CMOS=m
+CONFIG_RTC_DRV_PL031=m
 CONFIG_RTC_DRV_TWL4030=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_SATA_AHCI_PLATFORM=m
diff -urpN linux-3.5.0.orig/debian.master/config/armhf/config.flavour.highbank linux-3.5.0/debian.master/config/armhf/config.flavour.highbank
--- linux-3.5.0.orig/debian.master/config/armhf/config.flavour.highbank	2012-08-10 16:28:30.000000000 -0500
+++ linux-3.5.0/debian.master/config/armhf/config.flavour.highbank	2012-08-10 16:32:07.199993532 -0500
@@ -135,6 +135,7 @@  CONFIG_PREEMPT_RCU=y
 # CONFIG_REISERFS_FS_POSIX_ACL is not set
 # CONFIG_REISERFS_FS_SECURITY is not set
 # CONFIG_RELAY is not set
+CONFIG_RTC_DRV_PL031=y
 CONFIG_RTC_DRV_TWL4030=m
 CONFIG_SATA_AHCI_PLATFORM=y
 # CONFIG_SCHED_AUTOGROUP is not set
diff -urpN linux-3.5.0.orig/debian.master/config/armhf/config.flavour.omap linux-3.5.0/debian.master/config/armhf/config.flavour.omap
--- linux-3.5.0.orig/debian.master/config/armhf/config.flavour.omap	2012-08-10 16:28:30.000000000 -0500
+++ linux-3.5.0/debian.master/config/armhf/config.flavour.omap	2012-08-10 16:32:07.229993532 -0500
@@ -135,6 +135,7 @@  CONFIG_QUOTA_NETLINK_INTERFACE=y
 CONFIG_REISERFS_FS_POSIX_ACL=y
 CONFIG_REISERFS_FS_SECURITY=y
 CONFIG_RELAY=y
+CONFIG_RTC_DRV_PL031=m
 CONFIG_RTC_DRV_TWL4030=y
 CONFIG_SATA_AHCI_PLATFORM=m
 CONFIG_SCHED_AUTOGROUP=y
diff -urpN linux-3.5.0.orig/debian.master/config/config.common.ubuntu linux-3.5.0/debian.master/config/config.common.ubuntu
--- linux-3.5.0.orig/debian.master/config/config.common.ubuntu	2012-08-10 16:28:30.000000000 -0500
+++ linux-3.5.0/debian.master/config/config.common.ubuntu	2012-08-10 16:32:55.609993528 -0500
@@ -4536,7 +4536,6 @@  CONFIG_RTC_DRV_PCF50633=m
 CONFIG_RTC_DRV_PCF8563=m
 CONFIG_RTC_DRV_PCF8583=m
 CONFIG_RTC_DRV_PL030=m
-CONFIG_RTC_DRV_PL031=m
 CONFIG_RTC_DRV_PS3=m
 CONFIG_RTC_DRV_R9701=m
 CONFIG_RTC_DRV_RP5C01=m