lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a45cf55f836c4befa65510e30440016c@sphcmbx02.sunplus.com.tw>
Date:   Wed, 22 Dec 2021 07:20:03 +0000
From:   Tony Huang 黃懷厚 <tony.huang@...plus.com>
To:     Arnd Bergmann <arnd@...db.de>
CC:     DTML <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Derek Kiernan <derek.kiernan@...inx.com>,
        Dragan Cvetic <dragan.cvetic@...inx.com>,
        Rob Herring <robh+dt@...nel.org>,
        gregkh <gregkh@...uxfoundation.org>,
        Wells Lu 呂芳騰 <wells.lu@...plus.com>,
        黃懷厚 <tonyhuang.sunplus@...il.com>
Subject: RE: [PATCH v4 2/2] misc: Add iop driver for Sunplus SP7021

Dear Arnd:

> > >> IOP (IO Processor) embedded inside SP7021 which is used as
> > >> Processor for I/O control, RTC wake-up and cooperation with CPU &
> > >> PMC in power management purpose.
> > >> The IOP core is DQ8051, so also named IOP8051, it supports
> > >> dedicated JTAG debug pins which share with SP7021.
> > >> In standby mode operation, the power spec reach 400uA.
> > >>
> > >> Signed-off-by: Tony Huang <tonyhuang.sunplus@...il.com>
> > >> ---
> > >> Changes in v4:
> > >>  - Addressed comments from Arnd Bergmann.
> >
> > >I don't think you did: I asked you specifically to add code to
> > >interact with the existing in-kernel interfaces to use the
> > >functionality provided by the device. Pick any (at least two)
> > >subsystems and add support, but leave out any custom user space
> > >interfaces (miscdevice, debugfs, sysfs, ...) for the moment.
> >
> >
> >
> > 1. IOP can run sp_iop_platform_driver_shudown() through the poweroff
> > command and the kernel. Perform system power-off actions.
> 
> Do you mean that this method a) cleanly shuts down the iop before the system
> is powered down, or b) the driver_shutdown() callback is used to initiate the
> powerdown of the system itself?
> 
> In case of a) I would not count that as exposing functionality, what you do here
> is just part of any driver. If instead you are trying to use b), this is the wrong
> way of doing it, see drivers/power/reset/ for examples of how to do it right.
> 
> > 2. Wake up the system by relying on the 8051 internal RTC wake-up
> > mechanism and external GPIO input signals to wake up.
> 
> I think those should be exposed with drivers/rtc for the RTC and drivers/gpio/
> for the GPIO driver, and then you can use the device tree to configure which
> GPIO to use as a wakeup and how it's connected to the RTC.
> 

I have a question to ask you:	
There are two ways to wake up the Linux kernel system in 8051.								
1)RTC wakeup:								
The SP7021 system mounts the RTC device driver.								
I set the RTC wake-up time by type commands in command line.								
Example: 
echo 0 > /sys/class/rtc/rtc0/wakealarm && nnn=`date '+%s'` && echo $nnn && nnn=`expr $nnn + 10` && echo $nnn > /sys/class/rtc/rtc0/wakealarm								
When the linux kernel system has no power. 8051 can read RTC resgister and receive RTC wakeup interrupt.								
Do I need to add RTC subsystem functiona to the IOP code?								
								
2)GPIO wakeup:								
According to your suggestion								
I use of_get_name_gpio() to get GPIO number from device tree during the IOP probe process.								
Pass it to 8051 for use.								

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ