Note: there is a subcpu.h header file with struct, and information matching what you are doing in the kernel source code, at least in my version. There are static functions defined in that header file to do conversions as well.
void subcpu_convert_to_line(struct *, char *)
void subcpu_convert_from_line( struct *, char *)
void subcpu_make_xor( struct *) // compute the checksum for byte 7.
int subcpu_check_xor(struct *)
A structure like: (but abbr. names)
struct subcpu_packet {
unsigned char category;
unsigned char command;
unsigned char data[4];
unsigned char xor_sum;
};
From the macros #defined at the top of the file, subcpu interfaces to the categories -- real time clock (RTC), (WAN), (USB_PHY), eg: I suspect these are the peripherals of the SONY reader. and mostly built in peripherals in the ARM processor from freescale; and I am sure looking at the datasheet would explain the rest of the acronyms.
"ACK" is 0x40 -- :"NEED ACK" is 0x80. So that explains the handshake you mentioned.
Also, clearly one may send commands to the processor through subcpu to SET time/date, Power, Charger, USB, MSSD (SD?) power, and MS (memory stick??) MSSD memorystick-SD power... aha! and some miscellaneous register read, write, bitset, and I2C test macros.
linux-2.6.23_091126/include/asm-arm/subcpu.h
Checking for source code tied to that header yields three items, one is a module; so there is example code one can look at for controlling the power state of SD memory, WAN, etc. from kernel modules....
Nice!
drivers/misc/extpowerctl/ext-power-ctl.c:#include <asm/subcpu.h>
drivers/mxc/pmic/wm8350/powerfunc.c:#include <asm/subcpu.h>
drivers/mxc/pmic/wm8350/pmic-wm8350-bus.c:#include <asm/subcpu.h>
include/asm-arm/subcpu.h: subcpu.h : Communication for Sub CPU
include/asm/subcpu.h: subcpu.h : Communication for Sub CPU
and a grep for subcpu in general, not only the header reveals these:
arch/arm/mach-mx3/system_npm.c
arch/arm/mach-mx3/mx31ebx5016_gpio.c
arch/arm/mach-mx3/mx31ebx5016.c
arch/arm/mach-mx3/mxc_pm_ebx5016.c
drivers/misc/extpowerctl/ext-power-ctl.c
drivers/mxc/pmic/wm8350/powerfunc.c
And the broadsheet video driver appears to be in there too.
drivers/broadsheet/broadsheet.h
drivers/broadsheet/mxcfb_broadsheet.c
Last edited by customelectronic; 09-06-2010 at 01:24 AM.
|