I have gone through so many of the questions and answers related to this topic, but I am stuck. Everything I've read indicates that the ADC module isn't actually enabled. I have not found a way to enable it.
I'm running a BeagleBone with Linux Kernel 3.8. I'm building a custom kernel module for the ADC. Right now a bare bones kernel module I wrote can tell me this information:
kernel: [ 342.092164] Mapped ADC to f9e0d000 kernel: [ 342.092173] Mapped CM_WKUP to f9e04000 kernel: [ 342.092180] CM_WKUP_ADC_TSC_CLKCTRL status: 0 kernel: [ 342.092187] CM_WKUP_L4WKUP_CLKCTRL status: 0 kernel: [ 342.092193] CM_WKUP_CLKSTCTRL status: 0x206438 kernel: [ 342.092199] CM_WKUP_ADC_TSC_CLKCTRL status: 0
I've ioremap'd the ADC region (0x44E0 D000) and the CM_WKUP region (0x44E0 4000).
It looks like CM_WKUP_ADC_TSC_CLKCTRL is fully functional, and CM_WKUP_L4WKUP_CLKCTRL is fully functional. Does this mean the ADC clock is powered and operational?
Bit 14 is set in CM_WKUP_CLKSTCTRL, which indicates the ADC clock domain is active. However bit 2 indicates the L4_WKUP clock is gated. Is this a problem here? How can I activate this clock?
I can write to any ADC related register (in chpt 12 of the TRMrM) without a problem. But if I try to read from a register, say the REVISION register, I get an error:
kernel: [ 102.586664] Unhandled fault: external abort on non-linefetch (0x1028) at 0xf9e0d040
I had this module working fine a couple days ago. I couldn't say what changed, but I have not been able to read from any ADC related register for the last couple days. Am I missing something basic in turning on the ADC?