[PM]Power Management related files for 3.14 kernel
PM related files for new 3.14 kernel added.
PM CM3 Firmware Version = 0x190 is taken from amx3-cm3 repo.
These images are required while building the kernel for power management funtionality.
Signed-off-by: Sharat Chandra <x0194459@ti.com>
PM related files for new 3.14 kernel added.
PM CM3 Firmware Version = 0x190 is taken from amx3-cm3 repo.
These images are required while building the kernel for power management funtionality.
Signed-off-by: Sharat Chandra <x0194459@ti.com>
irq conflict issue resolved
IRQ conflict related to am43xx-mag and am43xx-adc after moving to 3.14 kernel is reolved
Error message "genirq: Flags mismatch irq 163. 00000004 (TI-am43xx-mag) vs. 00000080 (TI-am43xx-adc)" was due
to not properly getting the interrupt number. This is resolved by adding proper variable
Signed-off-by: Sharat Chandra <x0194459@ti.com>
IRQ conflict related to am43xx-mag and am43xx-adc after moving to 3.14 kernel is reolved
Error message "genirq: Flags mismatch irq 163. 00000004 (TI-am43xx-mag) vs. 00000080 (TI-am43xx-adc)" was due
to not properly getting the interrupt number. This is resolved by adding proper variable
Signed-off-by: Sharat Chandra <x0194459@ti.com>
PM: changes for resuming from deep sleep
Defconfig for PM
[DEFCONFIG]Updated the defconfig with working config.
Additional functions and macro added 1) Read system call addded to MSR driver which copies raw data recorded on swiping the mag card. This system call is needed by the new public side example application which decodes the raw data. 2) Function name modified as required by the 3.14 kernel 3) Variable added
Signed-off-by: Sharat Chandra <x0194459@ti.com>
Signed-off-by: Sharat Chandra <x0194459@ti.com>
VFI: ti-usim: multicard switch modification
While moving from one slot to another, context restore should avoid writing
following registers
- SCKL_CTRL: Register defines clock paramters, should be only modify on clock
change request.
- USIM_CONF2/IRQENABLE: All parameters associated with these registers are
applicable while initiating Tx/Rx transaction. Re-Writing these registers might
cause improper state/signal. Registers will be configured while doing Tx/Rx
with ICC on respected slot.
Signed-off-by: Satish Patel <satish.patel@ti.com>
While moving from one slot to another, context restore should avoid writing
following registers
- SCKL_CTRL: Register defines clock paramters, should be only modify on clock
change request.
- USIM_CONF2/IRQENABLE: All parameters associated with these registers are
applicable while initiating Tx/Rx transaction. Re-Writing these registers might
cause improper state/signal. Registers will be configured while doing Tx/Rx
with ICC on respected slot.
Signed-off-by: Satish Patel <satish.patel@ti.com>
VFI: char: ti-usim: smart card clock update sequence
Updated clock sequence for smart card.
USIM_CONF2.CONFSCLKMODE/CONFSCLKDIV will be applicable for single card scenario
only.
For VFI use case, clock should be update with "USIM_SCLK_CTRL" register. Both
mode and division factor should be updated in single write operation
Signed-off-by: Satish Patel <satish.patel@ti.com>
Updated clock sequence for smart card.
USIM_CONF2.CONFSCLKMODE/CONFSCLKDIV will be applicable for single card scenario
only.
For VFI use case, clock should be update with "USIM_SCLK_CTRL" register. Both
mode and division factor should be updated in single write operation
Signed-off-by: Satish Patel <satish.patel@ti.com>
VFI: HyperSEAM: Update definitions of service IDs
As new features are added, corresponding service
IDs need to be exported for use in public world
applications.
This commit uses latest definition in HyperSEAM.
Signed-off-by: Sanjeev Premi <premi@ti.com>
As new features are added, corresponding service
IDs need to be exported for use in public world
applications.
This commit uses latest definition in HyperSEAM.
Signed-off-by: Sanjeev Premi <premi@ti.com>
VFI: omap2plus_defconfig: Added multicard support for usim by default
Default Multicard support(user card and SAM cards) for Usim added to
omap2plus_defconfig
Signed-off-by: Sharat Chandra <sharat.chandra@ti.com>
Default Multicard support(user card and SAM cards) for Usim added to
omap2plus_defconfig
Signed-off-by: Sharat Chandra <sharat.chandra@ti.com>
VFI: char: ti-usim: multicard support
Mutlicard support with single USIM instance is added.
This is **VFI** exclusive requirement.
Support to switch between SAM and user slot
"CONFIG_TI_USIM_MULTICARD" - configure parameter added to enable multicard
support
Signed-off-by: Satish Patel <satish.patel@ti.com>
Mutlicard support with single USIM instance is added.
This is **VFI** exclusive requirement.
Support to switch between SAM and user slot
"CONFIG_TI_USIM_MULTICARD" - configure parameter added to enable multicard
support
Signed-off-by: Satish Patel <satish.patel@ti.com>
VFI: ARM: dts: AM43xx-epos-evm: max slot entry set to 4
Max slot entry set to 4.
This is to support VFI specific requirement of multicard support with single
controller.
Signed-off-by: Satish Patel <satish.patel@ti.com>
Max slot entry set to 4.
This is to support VFI specific requirement of multicard support with single
controller.
Signed-off-by: Satish Patel <satish.patel@ti.com>
char: pub2sec: do cache maintenance only over the region shared between public and secure side
Remove unnecessary and inefficient full cache flush/invalidate operations on
inner and outer caches. Instead do cache maintenance only on the buffers
actually shared across public and secure worlds.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
Remove unnecessary and inefficient full cache flush/invalidate operations on
inner and outer caches. Instead do cache maintenance only on the buffers
actually shared across public and secure worlds.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
ARM: OMAP: Use cache flush by range on parameter array passed to secure monitor ROM
Secure ROM monitor is passed a parameter list pointer as argument for HAL and
monitor mode APIs. A D-cache flush all operation was performed to ensure
coherency. A full flush is not required in this case. Instead, use cache flush
by range only over the parameter list area.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
Secure ROM monitor is passed a parameter list pointer as argument for HAL and
monitor mode APIs. A D-cache flush all operation was performed to ensure
coherency. A full flush is not required in this case. Instead, use cache flush
by range only over the parameter list area.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
bus: omap_l3_noc: Evaluate error status with mask read from corresponding register inside ISR
Patch "bus: omap_l3_noc: fix unclearable error handling" added a check in L3
error ISR to mask the raw error status with those actually enabled to avoid
continuously handling unclearable errors. The current mask value was stored in a
driver level variable after masking such unclearable errors on their first
occurrence.
But, the mask values are not retained in h/w across suspend-resume
(DeepSleep, RTC) causing the actual mask in registers and that maintained in
driver getting out of sync. Since the default value on resume is to have all
errors enabled, the occurrence of any unclearable error after resume would
lead to ISR getting called continuously. This is because the ISR would skip
masking the error as the mask value in s/w would indicate the error to have
already been masked.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
Conflicts:
drivers/bus/omap_l3_noc.c
Patch "bus: omap_l3_noc: fix unclearable error handling" added a check in L3
error ISR to mask the raw error status with those actually enabled to avoid
continuously handling unclearable errors. The current mask value was stored in a
driver level variable after masking such unclearable errors on their first
occurrence.
But, the mask values are not retained in h/w across suspend-resume
(DeepSleep, RTC) causing the actual mask in registers and that maintained in
driver getting out of sync. Since the default value on resume is to have all
errors enabled, the occurrence of any unclearable error after resume would
lead to ISR getting called continuously. This is because the ISR would skip
masking the error as the mask value in s/w would indicate the error to have
already been masked.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
Conflicts:
drivers/bus/omap_l3_noc.c
ARM: AM43XX: HS: PM: Cleaned up un-necessary local defines
char: ti-usim: Remove unconditional usim_enable call in PM resume
As usim driver would allow PM suspend only when there is no card present on slot
and smartcard interface is not active, there is no need of enabling functional
clocks and configuring in PM resume, it would be done anyway later on need basis when
a card is inserted.
This way,unnecessary power drain on smartcard interface would be avoided
As usim driver would allow PM suspend only when there is no card present on slot
and smartcard interface is not active, there is no need of enabling functional
clocks and configuring in PM resume, it would be done anyway later on need basis when
a card is inserted.
This way,unnecessary power drain on smartcard interface would be avoided
HyperSEAM: Update exported public definitions
This is done as per latest PPA code for available secure services.
This is done as per latest PPA code for available secure services.
ARM: AM43XX: HS: Updated rtc_wake_src() API to get wakeup source
On HS part, there are two wakeup sources for RTC only mode-
1. Tamper's internal RTC alarm
2. Externel wakeup(pressing Power On button for ~600ms)
The flag is stored in Tamper's battery backed up memory and a secure service
call is added to fetch that information.
On HS part, there are two wakeup sources for RTC only mode-
1. Tamper's internal RTC alarm
2. Externel wakeup(pressing Power On button for ~600ms)
The flag is stored in Tamper's battery backed up memory and a secure service
call is added to fetch that information.
ARM: AM43XX: HS: Enable Core Tamper Monitoring in RTC only wakeup
Once clocks are enabled and PLLs are restored back, a secure service is added
to enable core side tamper monitoring events.
Once clocks are enabled and PLLs are restored back, a secure service is added
to enable core side tamper monitoring events.
AM43XX:HS:Changes to make USIM & Tamper work on the new baseline
[Kbuild] magadc header file included
Included ti_magadc.h file for exporting header file list
Signed-off-by: Sharat Chandra <x0194459@ti.com>
Conflicts:
include/uapi/linux/Kbuild
Included ti_magadc.h file for exporting header file list
Signed-off-by: Sharat Chandra <x0194459@ti.com>
Conflicts:
include/uapi/linux/Kbuild
[MSR] Raw data decoding on secure side
MSR driver is modified to work with public and secure side application.
Driver stores user app pid and sends signal on swipe. User app loads and
invokes secure app to create public RW memory.Public RW mem is filled with
raw data in driver. Secure app decodes the data and displays.
Both input subsystem and decode application (if any app running) are intimated
about the swipe.
Issue related to improper interrupt clear also fixed
Signed-off-by: Sharat Chandra <x0194459@ti.com>
MSR driver is modified to work with public and secure side application.
Driver stores user app pid and sends signal on swipe. User app loads and
invokes secure app to create public RW memory.Public RW mem is filled with
raw data in driver. Secure app decodes the data and displays.
Both input subsystem and decode application (if any app running) are intimated
about the swipe.
Issue related to improper interrupt clear also fixed
Signed-off-by: Sharat Chandra <x0194459@ti.com>
Revert "[MSR] Raw data decoding on secure side"
This patch has wrong Kbuild file. So reverting this patch. The actual magadc
driver and proper Kbuild patches will be pushed on top of this revert patch
This reverts commit ed21bc5f110330b059d403f2bc12e1f8bc1b04f2.
Conflicts:
drivers/input/misc/ti_magadc.c
include/uapi/linux/Kbuild
This patch has wrong Kbuild file. So reverting this patch. The actual magadc
driver and proper Kbuild patches will be pushed on top of this revert patch
This reverts commit ed21bc5f110330b059d403f2bc12e1f8bc1b04f2.
Conflicts:
drivers/input/misc/ti_magadc.c
include/uapi/linux/Kbuild
char: ti-usim: putting usim to IDLE before protocol switch
Putting USIM to IDLE state before protocol switch.
This will ensure re-setting all (BWT/CWT/CGT/BGT) timer counters.
Signed-off-by: Satish Patel <satish.patel@ti.com>
Putting USIM to IDLE state before protocol switch.
This will ensure re-setting all (BWT/CWT/CGT/BGT) timer counters.
Signed-off-by: Satish Patel <satish.patel@ti.com>
ARM: AM43XX: HS: Add RTC only support in late suspend call
A PM mode parameter in smc call is added to ensure that actions
are taken in secure world for either Deepsleep or RTC only mode as
requested.
Conflicts:
arch/arm/mach-omap2/sleep43xx.S
A PM mode parameter in smc call is added to ensure that actions
are taken in secure world for either Deepsleep or RTC only mode as
requested.
Conflicts:
arch/arm/mach-omap2/sleep43xx.S
ARM: AM43XX: HS: Add RTC only support with early suspend call
A smc call is added in PM suspend flow to store kernel physical resume
address into Tamper Battery backed SRAM.
Conflicts:
arch/arm/mach-omap2/pm33xx.c
A smc call is added in PM suspend flow to store kernel physical resume
address into Tamper Battery backed SRAM.
Conflicts:
arch/arm/mach-omap2/pm33xx.c
ARM: AM43XX: HS: Remove Public RTC calls from PM routines
PM flow with respect to RTC only mode is implemented through Tamper
RTC on secure devices, so removed public RTC calls. Corrospondig calls
through secure services would be added in separate patch.
Note: The removal may look like hack in present code and can change subject
to further tests and code-review.
Signed-off-by: ankur <a-kishore@ti.com>
Conflicts:
arch/arm/mach-omap2/pm33xx.c
arch/arm/mach-omap2/sleep43xx.S
PM flow with respect to RTC only mode is implemented through Tamper
RTC on secure devices, so removed public RTC calls. Corrospondig calls
through secure services would be added in separate patch.
Note: The removal may look like hack in present code and can change subject
to further tests and code-review.
Signed-off-by: ankur <a-kishore@ti.com>
Conflicts:
arch/arm/mach-omap2/pm33xx.c
arch/arm/mach-omap2/sleep43xx.S
ARM: AM43XX: HS: Remove public RTC from hwmod data
On HS parts, there is no separate public RTC SS but inbuilt one inside
Tamper Subsystem which gets configured as part of secure code execution.
Signed-off-by: ankur <a-kishore@ti.com>
Conflicts:
arch/arm/mach-omap2/omap_hwmod_33xx_data.c
On HS parts, there is no separate public RTC SS but inbuilt one inside
Tamper Subsystem which gets configured as part of secure code execution.
Signed-off-by: ankur <a-kishore@ti.com>
Conflicts:
arch/arm/mach-omap2/omap_hwmod_33xx_data.c
ARM: OMAP: AM43XX: Update parameter passing to PPA services for suspend resume on HS device
On HS device, PPA services to be called during suspend-resume sequence require
parameter array to be passed with physical address of parameter buffer. To
ensure the logic doesn't depend on the load address of suspend code as well as
the virtual-physical mapping, determine the same run time.
At present, the number of parameters are set as 0 but can be modified as
required by the service to be invoked. A 5 element array is allocated in sleep
code area to hold the parameter count followed by the actual parameters (4
parameters max).
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
Conflicts:
arch/arm/mach-omap2/sleep43xx.S
On HS device, PPA services to be called during suspend-resume sequence require
parameter array to be passed with physical address of parameter buffer. To
ensure the logic doesn't depend on the load address of suspend code as well as
the virtual-physical mapping, determine the same run time.
At present, the number of parameters are set as 0 but can be modified as
required by the service to be invoked. A 5 element array is allocated in sleep
code area to hold the parameter count followed by the actual parameters (4
parameters max).
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
Conflicts:
arch/arm/mach-omap2/sleep43xx.S
ARM: OMAP: PM: Adjust the SPI number passed to wakeupgen
With patch "drivers: irq-gic: Enable SGI support for non SMP usecase", support
for using 16 SGIs as general purpose s/w interrupt was included by updating
(rather, hacking) GIC code to treat the SGIs that way - in process - with
addition of 16 more interrupts when CONFIG_GIC_NON_SMP is selected, as is the
case for AM43XX.
This has the obvious effect on SPI indexing, the most impacted being wakeupgen
which caters to SPIs only. In short, with the above mentioned patch for SGI, SPI
number 68 would become 84 and thus affecting the wakeup mechanism which could
depend on interrupt #68 and so on.
A direct issue observed after the SGI support path was with broken CPU Idle on
AM43XX. Due to incorrect mapping of SPIs, the system would not wake up from idle
state when MPU clock was gated.
This patch compensates the bug by deducting 16 to get back the real SPI number.
Note that, it would be better to get rid of the original SGI patch which
introduced this issue and come up with cleaner solution for using software
generated local interrupts. With that fixed, this patch too would not be
required. Besides, the said patch would also have similar impact on any
new/existing GIC extensions.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
With patch "drivers: irq-gic: Enable SGI support for non SMP usecase", support
for using 16 SGIs as general purpose s/w interrupt was included by updating
(rather, hacking) GIC code to treat the SGIs that way - in process - with
addition of 16 more interrupts when CONFIG_GIC_NON_SMP is selected, as is the
case for AM43XX.
This has the obvious effect on SPI indexing, the most impacted being wakeupgen
which caters to SPIs only. In short, with the above mentioned patch for SGI, SPI
number 68 would become 84 and thus affecting the wakeup mechanism which could
depend on interrupt #68 and so on.
A direct issue observed after the SGI support path was with broken CPU Idle on
AM43XX. Due to incorrect mapping of SPIs, the system would not wake up from idle
state when MPU clock was gated.
This patch compensates the bug by deducting 16 to get back the real SPI number.
Note that, it would be better to get rid of the original SGI patch which
introduced this issue and come up with cleaner solution for using software
generated local interrupts. With that fixed, this patch too would not be
required. Besides, the said patch would also have similar impact on any
new/existing GIC extensions.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
AM43xx: HS: Enable Performance and Ondemand governors
This patch keeps Performance and Ondemand governor enabled when Userspace
governor is chosen as default option under CPU_FREQ scaling.
Conflicts:
arch/arm/configs/omap2plus_defconfig
This patch keeps Performance and Ondemand governor enabled when Userspace
governor is chosen as default option under CPU_FREQ scaling.
Conflicts:
arch/arm/configs/omap2plus_defconfig
AM43xx: HS: Change default cpu_freq governor to 'userspace'
Use userspace governor for EPOS SDK. User can later change it back to
on-demand governor based on the system requirements
Conflicts:
arch/arm/configs/omap2plus_defconfig
Use userspace governor for EPOS SDK. User can later change it back to
on-demand governor based on the system requirements
Conflicts:
arch/arm/configs/omap2plus_defconfig
[MSR] Raw data decoding on secure side
MSR driver is modified to work with public and secure side application.
Driver stores user app pid and sends signal on swipe. User app loads and
invokes secure app to create public RW memory.Public RW mem is filled with
raw data in driver. Secure app decodes the data and displays.
Both input subsystem and decode application (if any app running) are intimated
about the swipe.
Issue related to improper interrupt clear also fixed
Signed-off-by: Sharat Chandra <x0194459@ti.com>
Conflicts:
include/uapi/linux/Kbuild
MSR driver is modified to work with public and secure side application.
Driver stores user app pid and sends signal on swipe. User app loads and
invokes secure app to create public RW memory.Public RW mem is filled with
raw data in driver. Secure app decodes the data and displays.
Both input subsystem and decode application (if any app running) are intimated
about the swipe.
Issue related to improper interrupt clear also fixed
Signed-off-by: Sharat Chandra <x0194459@ti.com>
Conflicts:
include/uapi/linux/Kbuild
HyperSEAM: LOG: Update module structure
Based on the change is secure world, updated structure
to include magic number to visually identify the log
area.
Signed-off-by: Sanjeev Premi <premi@ti.com>
Based on the change is secure world, updated structure
to include magic number to visually identify the log
area.
Signed-off-by: Sanjeev Premi <premi@ti.com>
[MSR] MSR Suspend/Resume issue resolved
Suspend and resume functions in mfd driver as well as magadc driver
are modified.
Issue was because of not all the registers of mfd driver and magadc
driver were being restored after resume.
Once all the registers are restored to proper values issue is resolved.
Signed-off-by: Sharat Chandra <x0194459@ti.com>
Conflicts:
drivers/mfd/ti_am335x_tscadc.c
Suspend and resume functions in mfd driver as well as magadc driver
are modified.
Issue was because of not all the registers of mfd driver and magadc
driver were being restored after resume.
Once all the registers are restored to proper values issue is resolved.
Signed-off-by: Sharat Chandra <x0194459@ti.com>
Conflicts:
drivers/mfd/ti_am335x_tscadc.c
char: ti-usim: block length update after int disable
Block length should be updated after disabling the 'USIM_IRQ_TX_BLOCK_DONE'
interrupt to avoid unexpected signal on this.
Signed-off-by: Satish Patel <satish.patel@ti.com>
Block length should be updated after disabling the 'USIM_IRQ_TX_BLOCK_DONE'
interrupt to avoid unexpected signal on this.
Signed-off-by: Satish Patel <satish.patel@ti.com>
char: ti-usim: stop atr timer after activation
Stopping ATR timer after activation over and ATR by reception inside fifo.
This will prevent raise of unwanted ATR timeout interrupt in future
Signed-off-by: Satish Patel <satish.patel@ti.com>
Stopping ATR timer after activation over and ATR by reception inside fifo.
This will prevent raise of unwanted ATR timeout interrupt in future
Signed-off-by: Satish Patel <satish.patel@ti.com>
char: ti-usim: warm reset flow fix
During warm reset sequence, ATR buffer is not getting updated with ATR bytes
from ICC.
Re-initialized ATR waiting flag to handle ATR interrupts on warm reset
Signed-off-by: Satish Patel <satish.patel@ti.com>
During warm reset sequence, ATR buffer is not getting updated with ATR bytes
from ICC.
Re-initialized ATR waiting flag to handle ATR interrupts on warm reset
Signed-off-by: Satish Patel <satish.patel@ti.com>
char: ti-usim: modified steps for smart card clock change
Updating division factor and clock mode (legacy/HF) in seperate operation leads
to duty cycle change (< 40%) while changing the clock frequency from one to
another after card activation. This can violate EMV compliance clause for duty
cycle during PPS negotiation.
Updating both the fields - division factor & mode in single operation prevent
above duty cycle change and acceptable frequency transition takes place
Signed-off-by: Satish Patel <satish.patel@ti.com>
Updating division factor and clock mode (legacy/HF) in seperate operation leads
to duty cycle change (< 40%) while changing the clock frequency from one to
another after card activation. This can violate EMV compliance clause for duty
cycle during PPS negotiation.
Updating both the fields - division factor & mode in single operation prevent
above duty cycle change and acceptable frequency transition takes place
Signed-off-by: Satish Patel <satish.patel@ti.com>
ARM: OMAP2+: AM43XX: Fix asm suspend abort path
During suspend abort path we must remove CKE override on EMIF otherwise
DDR will not be able to come out of self refresh correctly.
Also, remove write to EMIF_SDRAM_CONFIG register in abort path that was
mistakenly added.
Conflicts:
arch/arm/mach-omap2/sleep43xx.S
During suspend abort path we must remove CKE override on EMIF otherwise
DDR will not be able to come out of self refresh correctly.
Also, remove write to EMIF_SDRAM_CONFIG register in abort path that was
mistakenly added.
Conflicts:
arch/arm/mach-omap2/sleep43xx.S
AM43x: input secure: Add new ioctl and read api for encrypted pin
Secure side keypad driver will share the encrypted pin data
with public world at shared location, so we need an interface to
read into user space. This patch adds IOCTL and READ system call
interface for the user space application to read it.
Please note that, it is synchronized with secure side application,
so secure side application will dectate when and how encrypted pin
gets shared.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Secure side keypad driver will share the encrypted pin data
with public world at shared location, so we need an interface to
read into user space. This patch adds IOCTL and READ system call
interface for the user space application to read it.
Please note that, it is synchronized with secure side application,
so secure side application will dectate when and how encrypted pin
gets shared.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
char: ti-usim : call sequence pm routine corrected
PM runtime routines for suspend/resume and probe/remove are corrected
All clk_get function properly closed by clk_put inside remove function
This patch fix error : "Could not transition all powerdomains" on resume while
usim module is in use.
Signed-off-by: Satish Patel <satish.patel@ti.com>
PM runtime routines for suspend/resume and probe/remove are corrected
All clk_get function properly closed by clk_put inside remove function
This patch fix error : "Could not transition all powerdomains" on resume while
usim module is in use.
Signed-off-by: Satish Patel <satish.patel@ti.com>
char: ti-usim: softreset of IP at Initialization
USIM IP soft reset is being performed when module is enable for use
This operation will clear all old state and put IP in reset state.
Signed-off-by: Satish Patel <satish.patel@ti.com>
USIM IP soft reset is being performed when module is enable for use
This operation will clear all old state and put IP in reset state.
Signed-off-by: Satish Patel <satish.patel@ti.com>
pub2sec: Prevent nested calls into pub2sec_dispatcher()
In addition to the IOCTL used in applications, the
SYSFS interface can also be lead to a nested SMC.
This is most probable when a test script is using the
interface.
The call to pub2sec_dispatcher() through this debug
interface is also tied with mutex preventing nested
IOCTL.
Signed-off-by: Sanjeev Premi <premi@ti.com>
In addition to the IOCTL used in applications, the
SYSFS interface can also be lead to a nested SMC.
This is most probable when a test script is using the
interface.
The call to pub2sec_dispatcher() through this debug
interface is also tied with mutex preventing nested
IOCTL.
Signed-off-by: Sanjeev Premi <premi@ti.com>
pub2sec: Prevent nested calls into ioctl()
When execution re-enters public world to service
an IRQ is detected in secure world, nested call
into ioctl() is a possibility. However, this can
lead to incorrect and sometimes unpredictable
results - esp when the exection on public world
depends upon the actions of ongoing service in
the secure world.
Nested call into ioctl() is prevented using a
mutex.
Signed-off-by: Sanjeev Premi <premi@ti.com>
When execution re-enters public world to service
an IRQ is detected in secure world, nested call
into ioctl() is a possibility. However, this can
lead to incorrect and sometimes unpredictable
results - esp when the exection on public world
depends upon the actions of ongoing service in
the secure world.
Nested call into ioctl() is prevented using a
mutex.
Signed-off-by: Sanjeev Premi <premi@ti.com>
AM43x: input: BUG FIX: Wrong check for numeric key magic value
Code was wrongly checking for the numeric key magic value,
and as a side-effect, non-numeric key press event also gets
detected as a numeric key.
This patch correctly checks for numeric key magic value.
Also, some cosmetic changes done under this patch, like,
space to tab conversion and fix the camel case variable declaration.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Code was wrongly checking for the numeric key magic value,
and as a side-effect, non-numeric key press event also gets
detected as a numeric key.
This patch correctly checks for numeric key magic value.
Also, some cosmetic changes done under this patch, like,
space to tab conversion and fix the camel case variable declaration.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
HyperSEAM: Update definitions of service IDs
As new features are added, corresponding service
IDs need to be exported for use in public world
applications.
This commit uses latest definition in PPA.
Signed-off-by: Sanjeev Premi <premi@ti.com>
As new features are added, corresponding service
IDs need to be exported for use in public world
applications.
This commit uses latest definition in PPA.
Signed-off-by: Sanjeev Premi <premi@ti.com>
Update definitions of generic PPA services
As new features are added, corresponding service
IDs need to be exported for use in public world
applications.
This commit uses latest definition in PPA.
Signed-off-by: Sanjeev Premi <premi@ti.com>
As new features are added, corresponding service
IDs need to be exported for use in public world
applications.
This commit uses latest definition in PPA.
Signed-off-by: Sanjeev Premi <premi@ti.com>
pub2sec: Change interface revision
The revision of the interface is uses as an invariant.
Updated the interface definition to begin at v0.80
instead of v0.00.
Fact that interface has been revised 3 times is still
being maintained.
Signed-off-by: Sanjeev Premi <premi@ti.com>
The revision of the interface is uses as an invariant.
Updated the interface definition to begin at v0.80
instead of v0.00.
Fact that interface has been revised 3 times is still
being maintained.
Signed-off-by: Sanjeev Premi <premi@ti.com>
omap2plus_defconfig: Enable INPUT_AM43X_SECURE driver
In order to support Secure keypad interception, enable
CONFIG_INPUT_AM43X_SECURE driver into default configuration.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
In order to support Secure keypad interception, enable
CONFIG_INPUT_AM43X_SECURE driver into default configuration.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
AM43x: input: Add secure input driver to input/misc
As part of pinpad entry usecase, currently input device would become
secure during pin entry. Secure side driver would pass-on the key press
event to public world and based on that public world driver would
process it further. Software generated interrupt (SGI [ID#0]) is being
used for the event notification from secure to public world.
Please note that, in real pinpad entry usecase, key press information
will be shared only in encryption form. As this is first step towards
final usecase, it shared key_event + key_information in raw form.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Conflicts:
arch/arm/boot/dts/am43x-epos-evm.dts
As part of pinpad entry usecase, currently input device would become
secure during pin entry. Secure side driver would pass-on the key press
event to public world and based on that public world driver would
process it further. Software generated interrupt (SGI [ID#0]) is being
used for the event notification from secure to public world.
Please note that, in real pinpad entry usecase, key press information
will be shared only in encryption form. As this is first step towards
final usecase, it shared key_event + key_information in raw form.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Conflicts:
arch/arm/boot/dts/am43x-epos-evm.dts
input: matrix_keypad: Add api to provide handle to input_dev
'input_dev' handle is required outside of matrix_keypad driver,
especially for secure input driver in order to process secure key events;
so this patch adds api which returns handle to struct input_dev.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
'input_dev' handle is required outside of matrix_keypad driver,
especially for secure input driver in order to process secure key events;
so this patch adds api which returns handle to struct input_dev.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
HyperSEAM: AM43XX: Steal reserved memory from kernel
This patch removes the HyperSEAM memory from kernel view and then remaps only
the public RO & RW region using ioremap_cached(), the region not accessible to
public side is not mapped.
An issue was seen where region not accessible to public side (NA) was being
implicitly/explicitly accessed from kernel resulting into firewall error when
the NA region was mapped cacheable. This patch prevents this issue.
NOTE: The size of log buffer region is assumed to be 1MB when creating the
mapping. This should be changed to map the actual log buffer region once a
corresponding service on secure side is added to query the region size.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
This patch removes the HyperSEAM memory from kernel view and then remaps only
the public RO & RW region using ioremap_cached(), the region not accessible to
public side is not mapped.
An issue was seen where region not accessible to public side (NA) was being
implicitly/explicitly accessed from kernel resulting into firewall error when
the NA region was mapped cacheable. This patch prevents this issue.
NOTE: The size of log buffer region is assumed to be 1MB when creating the
mapping. This should be changed to map the actual log buffer region once a
corresponding service on secure side is added to query the region size.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
omap2plus_defconfig: expose tty emulation for hci
Expose /dev/hci_tty driver emulation for hci.
This allows easy integration of broad market bluetooth stacks
over TI wilink chipset.
Signed-off-by: Eyal Reizer <eyalr@ti.com>
Conflicts:
arch/arm/configs/omap2plus_defconfig
Expose /dev/hci_tty driver emulation for hci.
This allows easy integration of broad market bluetooth stacks
over TI wilink chipset.
Signed-off-by: Eyal Reizer <eyalr@ti.com>
Conflicts:
arch/arm/configs/omap2plus_defconfig
Bluetooth: Add tty HCI driver
tty_hci driver exposes a /dev/hci_tty character device node, that intends to
emulate a generic /dev/ttyX device that would be used by the user-space
Bluetooth stacks to send/receive data to/from the WL combo-connectivity
chipsets.
The device driver has no internal logic of its own to intrepret data & all
such logic is handled by the user-space stack.
Change-Id: Ifa3860bbc7e252af210fde710bce14143239b552
Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
[Fixed checkpatch warnings]
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
[Fixed checkpatch --strict warnings]
Signed-off-by: Eyal Reizer <eyalr@ti.com>
Conflicts:
drivers/misc/ti-st/tty_hci.c
tty_hci driver exposes a /dev/hci_tty character device node, that intends to
emulate a generic /dev/ttyX device that would be used by the user-space
Bluetooth stacks to send/receive data to/from the WL combo-connectivity
chipsets.
The device driver has no internal logic of its own to intrepret data & all
such logic is handled by the user-space stack.
Change-Id: Ifa3860bbc7e252af210fde710bce14143239b552
Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
[Fixed checkpatch warnings]
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
[Fixed checkpatch --strict warnings]
Signed-off-by: Eyal Reizer <eyalr@ti.com>
Conflicts:
drivers/misc/ti-st/tty_hci.c
am43x-epos-evm: add device tree support for bluetooth
* Add device tree initilization for kim and ti shared transport
* Mux the uart3 pins used for connection to Wilink8 bluetooth and
the bluetooth enable gpio pin
Signed-off-by: Eyal Reizer <eyalr@ti.com>
Conflicts:
arch/arm/boot/dts/am43x-epos-evm.dts
* Add device tree initilization for kim and ti shared transport
* Mux the uart3 pins used for connection to Wilink8 bluetooth and
the bluetooth enable gpio pin
Signed-off-by: Eyal Reizer <eyalr@ti.com>
Conflicts:
arch/arm/boot/dts/am43x-epos-evm.dts
am43x-epos-evm: include wlan interrupt pin in pinmux struct
the wlan irq pin (gpio0_31) mux was intialized but not used in the
pinmux structure.
This resulted with no interrupts from the wl8 chip which triggered
a recovery. This commit fix this issue.
Signed-off-by: Eyal Reizer <eyalr@ti.com>
Conflicts:
arch/arm/boot/dts/am43x-epos-evm.dts
the wlan irq pin (gpio0_31) mux was intialized but not used in the
pinmux structure.
This resulted with no interrupts from the wl8 chip which triggered
a recovery. This commit fix this issue.
Signed-off-by: Eyal Reizer <eyalr@ti.com>
Conflicts:
arch/arm/boot/dts/am43x-epos-evm.dts
HyperSEAM: Call service to perform early initialization
So far, the service was not doing anything useful.
Hence, it wasn't being called.
Signed-off-by: Sanjeev Premi <premi@ti.com>
So far, the service was not doing anything useful.
Hence, it wasn't being called.
Signed-off-by: Sanjeev Premi <premi@ti.com>
MAGADC: MSR driver is updated with PM support
Power Management support for MSR driver is added.
Suspend/resume functionality is added to the existing MSR driver.
Signed-off-by: Sharat Chandra <sharat.chandra@ti.com>
Power Management support for MSR driver is added.
Suspend/resume functionality is added to the existing MSR driver.
Signed-off-by: Sharat Chandra <sharat.chandra@ti.com>
misc:TCA5013 - Driver for TI smart card phy
Updated review comments
This file is a i2c client driver for TI Phy (TCA5013).
TCA5013 is interfaced to usim controller via i2c protocol.
This driver reads the data from smartcard and the data is sent to (or
read by usim) controller and sent to application.
TCA5013 supports one User card (in Async and Sync mode) and 3 SAM (Async
mode only) cards. Again, Sync mode of User cards support two types of
cards (type 1 and type2 sync card).
Added Kconfig and Makefile entry for building TCA5013 driver(TI Phy)
Supported features:
1) User card in Async mode and Type1 Sync card (auto activation only)
2) SAM card
Not Supported (future enhancement)
1) Type2 sync card
2) Manual activation in Sync cards of both type.
Signed-off-by: Sharat Chandra <x0194459@ti.com>
Conflicts:
drivers/misc/Makefile
Updated review comments
This file is a i2c client driver for TI Phy (TCA5013).
TCA5013 is interfaced to usim controller via i2c protocol.
This driver reads the data from smartcard and the data is sent to (or
read by usim) controller and sent to application.
TCA5013 supports one User card (in Async and Sync mode) and 3 SAM (Async
mode only) cards. Again, Sync mode of User cards support two types of
cards (type 1 and type2 sync card).
Added Kconfig and Makefile entry for building TCA5013 driver(TI Phy)
Supported features:
1) User card in Async mode and Type1 Sync card (auto activation only)
2) SAM card
Not Supported (future enhancement)
1) Type2 sync card
2) Manual activation in Sync cards of both type.
Signed-off-by: Sharat Chandra <x0194459@ti.com>
Conflicts:
drivers/misc/Makefile
AM43xx: WAKEUP-M3: Added Tamper into list of wakeup sources
Tamper also provides swakeup support for Deepsleep modes, so
its added into list of available sources.
Signed-off-by: ankur <a-kishore@ti.com>
Conflicts:
arch/arm/mach-omap2/wkup_m3.c
Tamper also provides swakeup support for Deepsleep modes, so
its added into list of available sources.
Signed-off-by: ankur <a-kishore@ti.com>
Conflicts:
arch/arm/mach-omap2/wkup_m3.c
AM43xx: HS: Add DS Late Suspend call for PPA
This support enables suspend tasks to be taken for secure peripherals
like Tamper , OTFA etc through a smc call.
It is added as the last thing before A9 clocks are gated and it does WFI,
so name is called as 'Late' Suspend.
Signed-off-by: ankur <a-kishore@ti.com>
Conflicts:
arch/arm/mach-omap2/sleep43xx.S
This support enables suspend tasks to be taken for secure peripherals
like Tamper , OTFA etc through a smc call.
It is added as the last thing before A9 clocks are gated and it does WFI,
so name is called as 'Late' Suspend.
Signed-off-by: ankur <a-kishore@ti.com>
Conflicts:
arch/arm/mach-omap2/sleep43xx.S
ARM: dts: am43xx: Added entry for TI smartcard phy
TI phy (TCA5013) entry added under I2C device list
For the boards with TI phy - usim can use this entry to communicate with
smartcard.
Signed-off-by: Satish Patel <satish.patel@ti.com>
Conflicts:
arch/arm/boot/dts/am43x-epos-evm.dts
TI phy (TCA5013) entry added under I2C device list
For the boards with TI phy - usim can use this entry to communicate with
smartcard.
Signed-off-by: Satish Patel <satish.patel@ti.com>
Conflicts:
arch/arm/boot/dts/am43x-epos-evm.dts
char:ti-usim: synchronous card support added
Support for synchronous card handling is added
Features includes
- Activation of sync cards
- Manual control for RST,CLK,IO pin of sync card
- Switching between modes - sync to async and vice versa
Signed-off-by: Satish Patel <satish.patel@ti.com>
Support for synchronous card handling is added
Features includes
- Activation of sync cards
- Manual control for RST,CLK,IO pin of sync card
- Switching between modes - sync to async and vice versa
Signed-off-by: Satish Patel <satish.patel@ti.com>
char: ti-usim: Timeout added for ATR
GET_ATR ioctl will wait for max allowed ATR time or else it will timeout and return
existing ATR bytes in buffer.
Signed-off-by: Satish Patel <satish.patel@ti.com>
GET_ATR ioctl will wait for max allowed ATR time or else it will timeout and return
existing ATR bytes in buffer.
Signed-off-by: Satish Patel <satish.patel@ti.com>
include:sc_phy: synchronous card support added
USIM can communicate with Phy for sync card
Features included
- Toggling RST,CLK pin for sync card communication
- Selection of various sync card types - type1,type1 and others
- Getting sync ATR:
From auto activation of sync card if phy supports auto activation
Signed-off-by: Satish Patel <satish.patel@ti.com>
USIM can communicate with Phy for sync card
Features included
- Toggling RST,CLK pin for sync card communication
- Selection of various sync card types - type1,type1 and others
- Getting sync ATR:
From auto activation of sync card if phy supports auto activation
Signed-off-by: Satish Patel <satish.patel@ti.com>
include:sc_phy: Remove conflicts for action type
Action type - SC_PHY_REMOVED & SC_PHY_CARD_OVERHEAT had conflict. So phy state
has been enumerated with difference range of series.
Signed-off-by: Satish Patel <satish.patel@ti.com>
Action type - SC_PHY_REMOVED & SC_PHY_CARD_OVERHEAT had conflict. So phy state
has been enumerated with difference range of series.
Signed-off-by: Satish Patel <satish.patel@ti.com>
ARM: configs: OMAP2+: Disable CONFIG_PREEMPT option in default config
With CONFIG_PREEMPT or CONFIG_PREEMPT_VOLUNTARY enabled,
system level issues have been observed, so as a temporary
workaround disable this option.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Conflicts:
arch/arm/configs/omap2plus_defconfig
With CONFIG_PREEMPT or CONFIG_PREEMPT_VOLUNTARY enabled,
system level issues have been observed, so as a temporary
workaround disable this option.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Conflicts:
arch/arm/configs/omap2plus_defconfig
OMAPDSS: AM43x: TEMP: Enable FIFO merge feature
The 1024 Bytes of FIFO size seems to be not sufficient
to fulfill the DSS bandwidth requirements, so as a workaround
we have to use FIFO merge option; this will give 3K DMA buffer.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Conflicts:
drivers/video/omap2/dss/apply.c
drivers/video/omap2/dss/dispc.c
The 1024 Bytes of FIFO size seems to be not sufficient
to fulfill the DSS bandwidth requirements, so as a workaround
we have to use FIFO merge option; this will give 3K DMA buffer.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Conflicts:
drivers/video/omap2/dss/apply.c
drivers/video/omap2/dss/dispc.c
HyperSEAM: Fix typo in routines returning public RO and RW size
The routines provided to get size of public RO and RW reserved memory for
HyperSEAM were returning the respective base address instead of size. This patch
fixes the same.
With this patch, the operations where public RO/RW area range was needed and
were relaying on above routines should work as intended - e.g., cache operations
over the RO/RW area.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
The routines provided to get size of public RO and RW reserved memory for
HyperSEAM were returning the respective base address instead of size. This patch
fixes the same.
With this patch, the operations where public RO/RW area range was needed and
were relaying on above routines should work as intended - e.g., cache operations
over the RO/RW area.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
ARM: AM43XX: Save public wakeupgen context irrespective of GP or HS device type
On AM43XX HS device, no separate secure service exists to save WakeupGen
context. Thus, save public context irrespective of the device type.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
On AM43XX HS device, no separate secure service exists to save WakeupGen
context. Thus, save public context irrespective of the device type.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
drivers: irq-gic: Enable SGI support for non SMP usecase
Currently the Software Generated Interrupts (SGI) are restricted to use only
for SMP architecture for inter-processor communication as rightly documented
in ARM GIC spec V1.
In the system with the uniprocessor (or multiprocessor) architecture with
TRUSTZONE enabled device (like, AM43xx device), the SGI can be used for
communication between secure-to-nonsecure world.
And in order to enable SGI event from secure world to non-secure world,
GIC driver __must__ support registration of interrupt service routine
for SGI's.
So the usecase is something like,
On Asynchronous HW events, certain secure functionality gets triggered and
SGI will be used to further trigger the completion and/or result of
operation (either in encrypted or plain form) to public world.
This patch modifies the GIC driver to enable SGI interrupts
for non SMP usecase. Please note that interrupt mapping property
coming from DT file is still the same.
In order to keep changes restricted to non SMP platforms, two
config options have been introduced,
CONFIG_GIC_NON_SMP of type 'bool':
Should be enabled only where SGI is being used in
Non SMP usecases.
CONFIG_GIC_IRQ_HW_START of type 'int':
'0' when CONFIG_GIC_NON_SMP is defined
'32' (default) for SMP architectures
Note that, this patch has not been yet tested on SMP platform.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Conflicts:
arch/arm/mach-omap2/Kconfig
drivers/irqchip/irq-gic.c
Currently the Software Generated Interrupts (SGI) are restricted to use only
for SMP architecture for inter-processor communication as rightly documented
in ARM GIC spec V1.
In the system with the uniprocessor (or multiprocessor) architecture with
TRUSTZONE enabled device (like, AM43xx device), the SGI can be used for
communication between secure-to-nonsecure world.
And in order to enable SGI event from secure world to non-secure world,
GIC driver __must__ support registration of interrupt service routine
for SGI's.
So the usecase is something like,
On Asynchronous HW events, certain secure functionality gets triggered and
SGI will be used to further trigger the completion and/or result of
operation (either in encrypted or plain form) to public world.
This patch modifies the GIC driver to enable SGI interrupts
for non SMP usecase. Please note that interrupt mapping property
coming from DT file is still the same.
In order to keep changes restricted to non SMP platforms, two
config options have been introduced,
CONFIG_GIC_NON_SMP of type 'bool':
Should be enabled only where SGI is being used in
Non SMP usecases.
CONFIG_GIC_IRQ_HW_START of type 'int':
'0' when CONFIG_GIC_NON_SMP is defined
'32' (default) for SMP architectures
Note that, this patch has not been yet tested on SMP platform.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Conflicts:
arch/arm/mach-omap2/Kconfig
drivers/irqchip/irq-gic.c
AM43XX: TEMP: Turn off PL310 ERRATA 588369 and 727915
These errata need to be turned off to avoid following
errors after we have turned off L2 cache:
scripts/kconfig/conf --silentoldconfig Kconfig
warning: (ARCH_OMAP4 && SOC_IMX6Q && SOC_IMX6SL && SOC_VF610)
selects PL310_ERRATA_588369 which has unmet direct dependencies (CACHE_L2X0)
warning: (ARCH_OMAP4 && SOC_IMX6Q && SOC_IMX6SL && SOC_VF610)
selects PL310_ERRATA_727915 which has unmet direct dependencies (CACHE_L2X0)
Both these errata don't apply for AM43XX as well.
Signed-off-by: Sanjeev Premi <premi@ti.com>
These errata need to be turned off to avoid following
errors after we have turned off L2 cache:
scripts/kconfig/conf --silentoldconfig Kconfig
warning: (ARCH_OMAP4 && SOC_IMX6Q && SOC_IMX6SL && SOC_VF610)
selects PL310_ERRATA_588369 which has unmet direct dependencies (CACHE_L2X0)
warning: (ARCH_OMAP4 && SOC_IMX6Q && SOC_IMX6SL && SOC_VF610)
selects PL310_ERRATA_727915 which has unmet direct dependencies (CACHE_L2X0)
Both these errata don't apply for AM43XX as well.
Signed-off-by: Sanjeev Premi <premi@ti.com>
char:ti-usim: removed checkpatch warnings
- removed checkpatch warnings - "avoid continuous character for strings in
quotes"
Signed-off-by: Satish Patel <satish.patel@ti.com>
- removed checkpatch warnings - "avoid continuous character for strings in
quotes"
Signed-off-by: Satish Patel <satish.patel@ti.com>
ARM: OMAP: AM43xx: main_clk moved to DT for usim
Since main clock reference moved to DT file, removing it from hwmod
Signed-off-by: Satish Patel <satish.patel@ti.com>
Conflicts:
arch/arm/mach-omap2/omap_hwmod_33xx_data.c
Since main clock reference moved to DT file, removing it from hwmod
Signed-off-by: Satish Patel <satish.patel@ti.com>
Conflicts:
arch/arm/mach-omap2/omap_hwmod_33xx_data.c
ARM: dts: AM43xx: fck clock entry is added to usim
To fix error "FIXME: clock-name 'fck' DOES NOT exist in dt!", fck entry is
added to usim node
Signed-off-by: Satish Patel <satish.patel@ti.com>
To fix error "FIXME: clock-name 'fck' DOES NOT exist in dt!", fck entry is
added to usim node
Signed-off-by: Satish Patel <satish.patel@ti.com>
char: ti-usim: PM suspend/resume support added
PM suspend/resume support is added
- driver will not allow to system go in suspended state if smartcard is in
activated state
Signed-off-by: Satish Patel <satish.patel@ti.com>
PM suspend/resume support is added
- driver will not allow to system go in suspended state if smartcard is in
activated state
Signed-off-by: Satish Patel <satish.patel@ti.com>
ARM: dts: AM43xx-epos-evm: #interrupt cell added for tda8026
- interrupt cell is added for NxP phy (tda8026)
- i2c system process this cell and give irq number as a part of i2c device node
Signed-off-by: Satish Patel <satish.patel@ti.com>
Conflicts:
arch/arm/boot/dts/am43x-epos-evm.dts
- interrupt cell is added for NxP phy (tda8026)
- i2c system process this cell and give irq number as a part of i2c device node
Signed-off-by: Satish Patel <satish.patel@ti.com>
Conflicts:
arch/arm/boot/dts/am43x-epos-evm.dts
char: ti-usim: removed unwanted register usage
- clean up register usage and removed unwanted
- Fixed comments from mainline RFC submission
- removed macro "CHECK_RET"
Signed-off-by: Satish Patel <satish.patel@ti.com>
- clean up register usage and removed unwanted
- Fixed comments from mainline RFC submission
- removed macro "CHECK_RET"
Signed-off-by: Satish Patel <satish.patel@ti.com>
char: ti-usim: file operation "write" is removed
"write" operation from usim fops is remove. All operation is supported through
"IOCTLs". Removing extra maintenance support on write ops.
Signed-off-by: Satish Patel <satish.patel@ti.com>
"write" operation from usim fops is remove. All operation is supported through
"IOCTLs". Removing extra maintenance support on write ops.
Signed-off-by: Satish Patel <satish.patel@ti.com>
char: ti-usim: BWT configuration added
Support to configure BWT counter is added
Signed-off-by: Satish Patel <satish.patel@ti.com>
Support to configure BWT counter is added
Signed-off-by: Satish Patel <satish.patel@ti.com>
include:sc_phy: Fixing comments from mainline RFC
Used NxP phy name instead of using generic phy in "sc_phy" structure
Signed-off-by: Satish Patel <satish.patel@ti.com>
Used NxP phy name instead of using generic phy in "sc_phy" structure
Signed-off-by: Satish Patel <satish.patel@ti.com>
misc: tda8026: Fixed comments by mainline RFC
- DT documentation added
- Corrected return values in irq handler
- Created single function for set/get c4 and c8 pin status
Signed-off-by: Satish Patel <satish.patel@ti.com>
- DT documentation added
- Corrected return values in irq handler
- Created single function for set/get c4 and c8 pin status
Signed-off-by: Satish Patel <satish.patel@ti.com>
AM43XX: HS: Enable non-secure access to control NEON/VFP post resume
This patch adds support for calling PPA service to enable NEON, VFP on DS
wakeup. Without this, the kernel would crash when accessing CP instructions
during wakeup (around switch to user space).
Note that, this is done as part of call to early resume handler service
implemented in secure world (PPA).
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
Conflicts:
arch/arm/mach-omap2/sleep43xx.S
This patch adds support for calling PPA service to enable NEON, VFP on DS
wakeup. Without this, the kernel would crash when accessing CP instructions
during wakeup (around switch to user space).
Note that, this is done as part of call to early resume handler service
implemented in secure world (PPA).
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
Conflicts:
arch/arm/mach-omap2/sleep43xx.S
ARM: OMAP: AM43x: Set SRAM size to 64KB for HS device
Note that the actual available onchip SRAM is 223 KB but to allow only keeping
first 64 KB of SRAM in retention during DeepSleep, restrict the available size
to 64KB. This will ensure that the resume code remains inside first 64KB and
retained. Saves around 0.5 mW during DeepSleep.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
Note that the actual available onchip SRAM is 223 KB but to allow only keeping
first 64 KB of SRAM in retention during DeepSleep, restrict the available size
to 64KB. This will ensure that the resume code remains inside first 64KB and
retained. Saves around 0.5 mW during DeepSleep.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
pub2sec: Implement local service to request data
User applications need a mechanism to fetch data
generated as result of a previous secure service.
Implement a local service for this purpose.
User applications need a mechanism to fetch data
generated as result of a previous secure service.
Implement a local service for this purpose.
pub2sec: Remove unused definition
HyperSEAM: Update exported public definitions
Added definitions for getting attributes of
the dropbox for loading secure applications.
Updated test services for CONFIG/MEM.
Added definitions for getting attributes of
the dropbox for loading secure applications.
Updated test services for CONFIG/MEM.
pub2sec: Allow optional payload via IOCTL
Update the command structure into allow arbitrary data
in userspace to be shared with the driver.
The destination address (physical) for the contents of
this buffer is contained in the same structure.
Signed-off-by: Sanjeev Premi <premi@ti.com>
Update the command structure into allow arbitrary data
in userspace to be shared with the driver.
The destination address (physical) for the contents of
this buffer is contained in the same structure.
Signed-off-by: Sanjeev Premi <premi@ti.com>
HyperSEAM: Invalidate cache for Public RO,RW area
On return from secure world, we need to ensure that both
Public RO and RW data is invalidated.
Signed-off-by: Sanjeev Premi <premi@ti.com>
On return from secure world, we need to ensure that both
Public RO and RW data is invalidated.
Signed-off-by: Sanjeev Premi <premi@ti.com>
HyperSEAM: Ensure data in Public RW area is committed
Currently, public RW area was flushed only for the size
of secure application being loaded to secure world.
However, this area could be used by other modules as well.
Now entire Public RW area is flushed before transitioning
to the secure world.
Signed-off-by: Sanjeev Premi <premi@ti.com>
Currently, public RW area was flushed only for the size
of secure application being loaded to secure world.
However, this area could be used by other modules as well.
Now entire Public RW area is flushed before transitioning
to the secure world.
Signed-off-by: Sanjeev Premi <premi@ti.com>
HyperSEAM: LOG: dev_info()->dev_dbg() when buffer is empty
Now that LOG is reasonably tested, message indicating
that buffer is empty can be changed to a debug message.
Else, it adds 'noise' in dmesg when the secure service
is not using the LOG buffer.
Signed-off-by: Sanjeev Premi <premi@ti.com>
Now that LOG is reasonably tested, message indicating
that buffer is empty can be changed to a debug message.
Else, it adds 'noise' in dmesg when the secure service
is not using the LOG buffer.
Signed-off-by: Sanjeev Premi <premi@ti.com>
AM43XX: Removed TI WL as it breaks Arago build
Removed TI Wireless LAN driver from omap2plus_defconfig as
arago build breaks due to hard coded .git/HEAD in WiFi driver
Conflicts:
arch/arm/configs/omap2plus_defconfig
Removed TI Wireless LAN driver from omap2plus_defconfig as
arago build breaks due to hard coded .git/HEAD in WiFi driver
Conflicts:
arch/arm/configs/omap2plus_defconfig
ARM: configs: OMAP2+: Enable HyperSEAM, pub2sec, PIXCIR & STRICT_DEVMEM
Consolidated changes to defconfig:
1. In order to restrict root processes full access to all
of the systems' memory through /dev/mem enable STRICT_DEVMEM.
2. Enable HYPERSEAM and PUB2SEC required for ePOS software
3. Enable Touchscreen driver (PIXCIR) present in ePOS EVM.
4. Enable MAG_ADC driver as a module
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Conflicts:
arch/arm/configs/omap2plus_defconfig
Consolidated changes to defconfig:
1. In order to restrict root processes full access to all
of the systems' memory through /dev/mem enable STRICT_DEVMEM.
2. Enable HYPERSEAM and PUB2SEC required for ePOS software
3. Enable Touchscreen driver (PIXCIR) present in ePOS EVM.
4. Enable MAG_ADC driver as a module
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Conflicts:
arch/arm/configs/omap2plus_defconfig
mfd: AM43xx: Fixing crash in rmmod before magadc
When the ti_am335x_tscadc mfd driver is rmmod-ed before the depending
module (ti_magadc), L3 error/or a crash with
'Unhandled fault: imprecise external abort' message happens
This is due to the incorrect sequence in .remove of ti_am335x_tscadc
mfd driver. The driver first gate the clocks (runtime pm) and then
call remove device of depending module. This makes the depending driver
to access the module registers (in .remove) after the clocks are gated.
This is fixed in this patch.
Signed-off-by: Visuvanadan Pasupathy <vichu@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
When the ti_am335x_tscadc mfd driver is rmmod-ed before the depending
module (ti_magadc), L3 error/or a crash with
'Unhandled fault: imprecise external abort' message happens
This is due to the incorrect sequence in .remove of ti_am335x_tscadc
mfd driver. The driver first gate the clocks (runtime pm) and then
call remove device of depending module. This makes the depending driver
to access the module registers (in .remove) after the clocks are gated.
This is fixed in this patch.
Signed-off-by: Visuvanadan Pasupathy <vichu@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
input: AM43xx: magadc: Fixing continous interrupts
In some EPOS boards the interrupts were getting flooded for magadc.
Two types of interrupts were flooding. Please find the cause and fix below:
1) EDMA completion callbacks:
Cause:
Even though there was no valid card swipe, default noise level in the evm,
triggers the ADC capture. And in the callback, since the ADC and EDMA is
getting programmed for next swipe, this interrupt becomes continous.
Fix:
This is fixed by increasing the threshold to 2200. The value of 2048
means the mean input value (0v Input). The range of the preamp output is
-1.2 to +1.2. This means zero to peak, converted value to be 1365.
The current threshold is kept as 10% of this peak swing
(2048+136 => 2184 ~= 2200). Though this threshold is bit high, it is
harmless and should work for all decent pcb designs.
2) Start of swipe interrupts from MAGADC
Cause:
The start of swipe interrupt is supposed to be raised only once (as per
its name) but it is getting raised continously till MAGADC module is
disable (once it starts by real swipe). This looks like IP bug.
Fix/workaround:
The start of swipe interrupt is not required by the driver and hence
is disabled.
Signed-off-by: Visuvanadan Pasupathy <vichu@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
In some EPOS boards the interrupts were getting flooded for magadc.
Two types of interrupts were flooding. Please find the cause and fix below:
1) EDMA completion callbacks:
Cause:
Even though there was no valid card swipe, default noise level in the evm,
triggers the ADC capture. And in the callback, since the ADC and EDMA is
getting programmed for next swipe, this interrupt becomes continous.
Fix:
This is fixed by increasing the threshold to 2200. The value of 2048
means the mean input value (0v Input). The range of the preamp output is
-1.2 to +1.2. This means zero to peak, converted value to be 1365.
The current threshold is kept as 10% of this peak swing
(2048+136 => 2184 ~= 2200). Though this threshold is bit high, it is
harmless and should work for all decent pcb designs.
2) Start of swipe interrupts from MAGADC
Cause:
The start of swipe interrupt is supposed to be raised only once (as per
its name) but it is getting raised continously till MAGADC module is
disable (once it starts by real swipe). This looks like IP bug.
Fix/workaround:
The start of swipe interrupt is not required by the driver and hence
is disabled.
Signed-off-by: Visuvanadan Pasupathy <vichu@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
input: AM43xx: magadc:Fixing the rmmod crash
In a scenario where card swipe and rmmod events are invoked
simultaneously, the driver crashed. This was because dma closure functions
(called in .remove) are not atomic and the dma callback preempted the dma
closure function in half way, thus accessing pointers under cleanup.
This patch fixes this issue, by (1) guarding the callback not to
execute during driver remove, (2) by cancelling the work (if any)
that will configure the peripheral for future callbacks and then
release/stopping dma.
The scenario mentioned above can be artificially created by lowering
the magadc swipe threshold and allowing the trigger to happen
continously and invoking rmmod.
Signed-off-by: Visuvanadan Pasupathy <vichu@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
In a scenario where card swipe and rmmod events are invoked
simultaneously, the driver crashed. This was because dma closure functions
(called in .remove) are not atomic and the dma callback preempted the dma
closure function in half way, thus accessing pointers under cleanup.
This patch fixes this issue, by (1) guarding the callback not to
execute during driver remove, (2) by cancelling the work (if any)
that will configure the peripheral for future callbacks and then
release/stopping dma.
The scenario mentioned above can be artificially created by lowering
the magadc swipe threshold and allowing the trigger to happen
continously and invoking rmmod.
Signed-off-by: Visuvanadan Pasupathy <vichu@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
input : AM43xx: Freeing input device in .remove
This patch frees the input device
Signed-off-by: Visuvanadan Pasupathy <vichu@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
This patch frees the input device
Signed-off-by: Visuvanadan Pasupathy <vichu@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
input: AM43xx: Fixing dma_map_single multiple calls
The same allocated buffer is used for multiple dma transfers.
In such cases only one set of dma_map_single and dma_unmap_single
is required. Hence moving the dma_map_single to appropriate
location so that it is called only once.
Signed-off-by: Visuvanadan Pasupathy <vichu@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
The same allocated buffer is used for multiple dma transfers.
In such cases only one set of dma_map_single and dma_unmap_single
is required. Hence moving the dma_map_single to appropriate
location so that it is called only once.
Signed-off-by: Visuvanadan Pasupathy <vichu@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>